Commit a3d3de59c for imagemagick.org
commit a3d3de59c26c511412237dc02322a68e9beecfbd
Author: Cristy <urban-warrior@imagemagick.org>
Date: Tue Feb 3 18:47:58 2026 -0500
https://github.com/ImageMagick/ImageMagick/issues/8555
diff --git a/coders/msl.c b/coders/msl.c
index c31f90461..bcb47579e 100644
--- a/coders/msl.c
+++ b/coders/msl.c
@@ -1634,12 +1634,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
for (j=0; j < msl_info->n; j++)
{
const char
- *prop;
+ *property;
- prop=GetImageProperty(msl_info->attributes[j],"id",
+ property=GetImageProperty(msl_info->attributes[j],"id",
exception);
- if ((prop != (const char *) NULL) &&
- (LocaleCompare(value,value) == 0))
+ if ((property != (const char *) NULL) &&
+ (LocaleCompare(property,value) == 0))
{
SetImageType(composite_image,TrueColorAlphaType,
exception);
diff --git a/coders/pcx.c b/coders/pcx.c
index fa881cc9f..66e2a7d46 100644
--- a/coders/pcx.c
+++ b/coders/pcx.c
@@ -401,6 +401,15 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowPCXException(CorruptImageError,"ImproperImageHeader");
if ((MagickSizeType) (pcx_packets/32+128) > GetBlobSize(image))
ThrowPCXException(CorruptImageError,"ImproperImageHeader");
+ {
+ size_t bytes_per_line = image->columns*pcx_info.bits_per_pixel;
+ if (bytes_per_line != 0)
+ bytes_per_line+=7U;
+ if (bytes_per_line != 0)
+ bytes_per_line/=8U;
+ if ((bytes_per_line == 0) || (pcx_info.bytes_per_line < bytes_per_line))
+ ThrowPCXException(CorruptImageError,"ImproperImageHeader");
+ }
scanline=(unsigned char *) AcquireQuantumMemory(MagickMax(image->columns,
pcx_info.bytes_per_line),MagickMax(pcx_info.planes,8)*sizeof(*scanline));
pixel_info=AcquireVirtualMemory(pcx_packets,2*sizeof(*pixels));