tiff/tiff-4.0.3-CVE-2013-4243.patch

20 lines
702 B
Diff
Raw Normal View History

Index: gif2tiff.c
===================================================================
RCS file: /cvs/maptools/cvsroot/libtiff/tools/gif2tiff.c,v
retrieving revision 1.12
diff -u -r1.12 gif2tiff.c
--- tools/gif2tiff.c 15 Dec 2010 00:22:44 -0000 1.12
+++ tools/gif2tiff.c 14 Aug 2013 04:43:31 -0000
@@ -280,6 +280,10 @@
fprintf(stderr, "no colormap present for image\n");
return (0);
}
+ if (width == 0 || height == 0) {
+ fprintf(stderr, "Invalid value of width or height\n");
+ return(0);
+ }
if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
fprintf(stderr, "not enough memory for image\n");
return (0);