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);