opt/libtiff/lzw-oob-write.patch
2013-08-28 18:13:16 +02:00

19 lines
566 B
Diff

Index: gif2tiff.c
===================================================================
RCS file: /cvs/maptools/cvsroot/libtiff/tools/gif2tiff.c,v
retrieving revision 1.12
diff -u -r1.12 gif2tiff.c
--- gif2tiff.c 15 Dec 2010 00:22:44 -0000 1.12
+++ gif2tiff.c 14 Aug 2013 04:28:07 -0000
@@ -398,6 +398,10 @@
}
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;