From 505062cdbd8b2bf7e2a13f0235af4144848202dd Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 11 Mar 2018 11:16:14 +0100 Subject: [PATCH] Fixed incorrect blob referencing. --- coders/mat.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/coders/mat.c b/coders/mat.c index f75300cd1..f3a922bfb 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -872,7 +872,6 @@ static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) int logging; int sample_size; MagickOffsetType filepos=0x80; - BlobInfo *blob; unsigned int (*ReadBlobXXXLong)(Image *image); unsigned short (*ReadBlobXXXShort)(Image *image); @@ -1305,11 +1304,9 @@ ExitLoop: /* Remove page offsets added by RotateImage */ rotated_image->page.x=0; rotated_image->page.y=0; - - blob = rotated_image->blob; - rotated_image->blob = image->blob; rotated_image->colors = image->colors; - image->blob = blob; + DestroyBlob(rotated_image); + rotated_image->blob=ReferenceBlob(image->blob); AppendImageToList(&image,rotated_image); DeleteImageFromList(&image); } -- 2.40.0