From 61909f3b6631498aba98c55b27910988c5e42c24 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 14 Sep 2017 19:25:48 -0400 Subject: [PATCH] https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32700 --- coders/tiff.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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]); -- 2.50.1