Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.
Permalink
Browse files Browse the repository at this point in the history
fix possible OOB write in gif2tiff.c
  • Loading branch information
fwarmerdam committed Aug 14, 2013
1 parent 8dc74e4 commit ce6841d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2013-08-14 Frank Warmerdam <warmerdam@pobox.com>

* tools/gif2tiff.c: fix possible OOB write (#2452, CVE-2013-4244)

2013-08-13 Frank Warmerdam <warmerdam@pobox.com>

* tools/gif2tiff.c: Be more careful about corrupt or
Expand Down
4 changes: 4 additions & 0 deletions tools/gif2tiff.c
Expand Up @@ -400,6 +400,10 @@ process(register int code, unsigned char** fill)
}

if (oldcode == -1) {
if (code >= clear) {
fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
return 0;
}
*(*fill)++ = suffix[code];
firstchar = oldcode = code;
return 1;
Expand Down

0 comments on commit ce6841d

Please sign in to comment.