Commit 3bd584ee6 for imagemagick.org
commit 3bd584ee65653b85003e00e7517a00dfc0987609
Author: Cristy <urban-warrior@imagemagick.org>
Date: Fri Jun 12 10:26:00 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-ff5c-8x9r-8qcw
diff --git a/MagickCore/property.c b/MagickCore/property.c
index 7590c26fd..cebf11e57 100644
--- a/MagickCore/property.c
+++ b/MagickCore/property.c
@@ -665,7 +665,6 @@ static void Get8BIMProperty(const Image *image,const char *key,
count=(ssize_t) ReadPropertyByte(&info,&length);
if ((count != 0) && ((size_t) count <= length))
{
- resource=(char *) NULL;
if (~((size_t) count) >= (MagickPathExtent-1))
resource=(char *) AcquireQuantumMemory((size_t) count+
MagickPathExtent,sizeof(*resource));
@@ -684,8 +683,9 @@ static void Get8BIMProperty(const Image *image,const char *key,
length=0;
continue;
}
- macroman_resource=(char *) ConvertMacRomanToUTF8((unsigned char *)
- resource);
+ if (resource != (char *) NULL)
+ macroman_resource=(char *) ConvertMacRomanToUTF8((unsigned char *)
+ resource);
if ((*name != '\0') && (*name != '#'))
if ((resource == (char *) NULL) || (macroman_resource == (char *) NULL) ||
((LocaleCompare(name,resource) != 0) &&