]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32700
authorCristy <urban-warrior@imagemagick.org>
Thu, 14 Sep 2017 23:25:48 +0000 (19:25 -0400)
committerCristy <urban-warrior@imagemagick.org>
Thu, 14 Sep 2017 23:25:48 +0000 (19:25 -0400)
coders/tiff.c

index 96247f18d61194e4f84ad54461dc3c853261fffb..5af9eb7d7d4ae983bc6c2f257fdd6c38e167c984 100644 (file)
@@ -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]);