Skip to content

Commit

Permalink
stb_image: fix for #76 POC h002. detect bad TGA file which has fake s…
Browse files Browse the repository at this point in the history
…ize declaration in its image header
  • Loading branch information
saitoha committed Aug 5, 2018
1 parent 2df6437 commit 3c071b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stb_image.h
Expand Up @@ -5566,6 +5566,7 @@ static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req
// OK, if I need to read a pixel, do it now
if ( read_next_pixel )
{
if (stbi__at_eof(s)) return stbi__errpuc("bad file","TGA file too short");
// load however much data we did have
if ( tga_indexed )
{
Expand Down

0 comments on commit 3c071b9

Please sign in to comment.