From: Cristy Date: Thu, 14 Sep 2017 23:25:48 +0000 (-0400) Subject: https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32700 X-Git-Tag: 7.0.7-3~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61909f3b6631498aba98c55b27910988c5e42c24;p=imagemagick https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32700 --- diff --git a/coders/tiff.c b/coders/tiff.c index 96247f18d..5af9eb7d7 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1,4 +1,4 @@ -/* +)/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % @@ -1025,7 +1025,7 @@ static TIFFMethodType GetJPEGMethod(Image* image,TIFF *tiff,uint16 photometric, #else uint32 #endif - **value; + *value; unsigned char buffer[BUFFER_SIZE+32]; @@ -1033,12 +1033,17 @@ static TIFFMethodType GetJPEGMethod(Image* image,TIFF *tiff,uint16 photometric, unsigned short length; - /* only support 8 bit for now */ + /* + Only support 8 bit for now. + */ if ((photometric != PHOTOMETRIC_SEPARATED) || (bits_per_sample != 8) || (samples_per_pixel != 4)) return(ReadGenericMethod); - /* Search for Adobe APP14 JPEG Marker */ - if (!TIFFGetField(tiff,TIFFTAG_STRIPOFFSETS,&value)) + /* + Search for Adobe APP14 JPEG marker. + */ + value=NULL; + if (!TIFFGetField(tiff,TIFFTAG_STRIPOFFSETS,&value) || (value == NULL)) return(ReadRGBAMethod); position=TellBlob(image); offset=(MagickOffsetType) (value[0]);