From: Dirk Lemstra Date: Sun, 3 Sep 2017 09:26:54 +0000 (+0200) Subject: Fix for possible realloc. X-Git-Tag: 7.0.7-0~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83a251d8d819e19d0ed6dd18d94ed9f4d2e9d571;p=imagemagick Fix for possible realloc. --- diff --git a/coders/tiff.c b/coders/tiff.c index 68a428b7f..fdff7f43b 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -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) {