mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(G24Format.ReadMetaData): fixed sanity check.
This commit is contained in:
parent
f676fd613e
commit
0a35f9acf6
@ -47,7 +47,7 @@ namespace GameRes.Formats.Elf
|
|||||||
int w = input.ReadInt16();
|
int w = input.ReadInt16();
|
||||||
int h = input.ReadInt16();
|
int h = input.ReadInt16();
|
||||||
if (w <= 0 || w > 0x1000 || h <= 0 || h > 0x1000
|
if (w <= 0 || w > 0x1000 || h <= 0 || h > 0x1000
|
||||||
|| x < 0 || x > 0x800 || h < 0 || h > 0x800)
|
|| x < 0 || x > 0x800 || y < 0 || y > 0x800)
|
||||||
return null;
|
return null;
|
||||||
return new ImageMetaData {
|
return new ImageMetaData {
|
||||||
Width = (uint)w,
|
Width = (uint)w,
|
||||||
|
Loading…
Reference in New Issue
Block a user