File ImageMagick-CVE-2026-23952.patch of Package ImageMagick.42534
From 1eefab41bc0ab1c6c2c1fd3e4a49e3ee1849751d Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Thu, 15 Jan 2026 17:34:46 -0500
Subject: [PATCH]
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-5vx3-wx4q-6cj8
---
PerlMagick/quantum/quantum.pm | 2 +-
coders/msl.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
Index: ImageMagick-6.8.8-1/coders/msl.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/msl.c
+++ ImageMagick-6.8.8-1/coders/msl.c
@@ -7392,6 +7392,12 @@ static void MSLEndElement(void *context,
{
if (LocaleCompare((const char *) tag,"comment") == 0 )
{
+ if (msl_info->image[n] == (Image *) NULL)
+ {
+ ThrowMSLException(OptionError,"NoImagesDefined",
+ (const char *) tag);
+ break;
+ }
(void) DeleteImageProperty(msl_info->image[n],"comment");
if (msl_info->content == (char *) NULL)
break;
@@ -7436,6 +7442,12 @@ static void MSLEndElement(void *context,
{
if (LocaleCompare((const char *) tag,"label") == 0 )
{
+ if (msl_info->image[n] == (Image *) NULL)
+ {
+ ThrowMSLException(OptionError,"NoImagesDefined",
+ (const char *) tag);
+ break;
+ }
(void) DeleteImageProperty(msl_info->image[n],"label");
if (msl_info->content == (char *) NULL)
break;