From 83a251d8d819e19d0ed6dd18d94ed9f4d2e9d571 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 3 Sep 2017 11:26:54 +0200 Subject: [PATCH] Fix for possible realloc. --- coders/tiff.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.50.1