fix [#34745] TGA with size of 4Kx8K won't load

Checked the size limit on TGA files in svn history and this is was just an arbitrary limit that might have made sense some years back, but not now.
This commit is contained in:
Campbell Barton
2013-03-24 20:59:53 +00:00
parent ae1325c963
commit 48a256c910

View File

@@ -344,8 +344,8 @@ static int checktarga(TARGA *tga, unsigned char *mem)
return 0;
}
if (tga->mapsize && tga->mapbits > 32) return 0;
if (tga->xsize <= 0 || tga->xsize >= 8192) return 0;
if (tga->ysize <= 0 || tga->ysize >= 8192) return 0;
if (tga->xsize <= 0) return 0;
if (tga->ysize <= 0) return 0;
if (tga->pixsize > 32) return 0;
if (tga->pixsize == 0) return 0;
return 1;