]> granicus.if.org Git - imagemagick/commitdiff
Fix for possible realloc.
authorDirk Lemstra <dirk@git.imagemagick.org>
Sun, 3 Sep 2017 09:26:54 +0000 (11:26 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sun, 3 Sep 2017 09:27:09 +0000 (11:27 +0200)
coders/tiff.c

index 68a428b7fe58aa6dd5b884f10186b4fff375e795..fdff7f43bcac033018df9008daa0d01328954761 100644 (file)
@@ -1066,6 +1066,8 @@ static void TIFFReadPhotoshopLayers(Image* image,const ImageInfo *image_info,
   /* Setting the mode to a value that won't change the colorspace */
   info.mode=10;
   ReadPSDLayers(layers,image_info,&info,MagickFalse,exception);
+  /* we need to set the datum in case a realloc happened */
+  ((StringInfo *) layer_info)->datum=GetBlobStreamData(layers);
   DeleteImageFromList(&layers);
   if (layers != (Image *) NULL)
     {