(GpFormat.ReadMetaData): stricter sanity check.

This commit is contained in:
morkt
2016-02-04 06:00:46 +04:00
parent 7756f8d8e8
commit fc6192bb2f

View File

@@ -62,7 +62,7 @@ namespace GameRes.Formats.Eushully
int bpp = stream.ReadByte();
if (alpha_channel < 0 || alpha_channel > 1 || method < 0 || method > 2
|| align1 < 0 || align1 > 4 || align2 < 0 || align2 > 4
|| bpp < 0 || !(bpp <= 16 || 24 == bpp || 32 == bpp))
|| bpp <= 0 || !(bpp <= 16 || 24 == bpp || 32 == bpp))
return null;
using (var reader = new ArcView.Reader (stream))
{