Commit 139c6924d for imagemagick.org
commit 139c6924d4cd03da8de7a9065a2a36491ba5c574
Author: Cristy <urban-warrior@imagemagick.org>
Date: Fri Oct 16 07:19:18 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-wvfx-g9wq-253w
diff --git a/MagickCore/compare.c b/MagickCore/compare.c
index afa248b39..4c080ae9e 100644
--- a/MagickCore/compare.c
+++ b/MagickCore/compare.c
@@ -3986,12 +3986,14 @@ static Image *DPCSimilarityImage(const Image *image,const Image *reconstruct,
if (trx_image == (Image *) NULL)
ThrowDPCSimilarityException();
rx_image=trx_image;
+ trx_image=(Image *) NULL;
try_image=SIMDivideByMagnitude(ry_image,magnitude_image,image,exception);
magnitude_image=DestroyImage(magnitude_image);
ry_image=DestroyImage(ry_image);
if (try_image == (Image *) NULL)
ThrowDPCSimilarityException();
ry_image=try_image;
+ try_image=(Image *) NULL;
/*
Compute X and Y derivatives of image.
*/
@@ -4018,12 +4020,14 @@ static Image *DPCSimilarityImage(const Image *image,const Image *reconstruct,
if (trx_image == (Image *) NULL)
ThrowDPCSimilarityException();
tx_image=trx_image;
+ trx_image=(Image *) NULL;
try_image=SIMDivideByMagnitude(ty_image,magnitude_image,image,exception);
ty_image=DestroyImage(ty_image);
magnitude_image=DestroyImage(magnitude_image);
if (try_image == (Image *) NULL)
ThrowDPCSimilarityException();
ty_image=try_image;
+ try_image=(Image *) NULL;
/*
Compute the cross correlation of the test and reference images.
*/