Skip to content

Commit

Permalink
gif: report error on bogus LWZ data, instead of overflowing a buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 28, 2018
1 parent 5c6aaba commit 4c830d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions IMG_gif.c
Expand Up @@ -497,8 +497,10 @@ LWZReadByte(SDL_RWops *src, int flag, int input_code_size)
return -3;
}
*sp++ = table[1][code];
if (code == table[0][code])
RWSetMsg("circular table entry BIG ERROR");
if (code == table[0][code]) {
RWSetMsg("circular table entry BIG ERROR");
return -3;
}
code = table[0][code];
}

Expand Down

0 comments on commit 4c830d4

Please sign in to comment.