(BMP): ignore incorrect length in bitmap header.

This commit is contained in:
morkt 2018-01-04 20:41:26 +04:00
parent 3732d8bb5d
commit babe2d93d7

View File

@ -124,6 +124,11 @@ namespace GameRes
return null;
size = (uint)file.Length;
}
else if (file.AsStream.CanSeek)
{
if (size > file.Length)
size = (uint)file.Length;
}
uint width, height;
if (0xC == header_size)
{