Commit 80b268ce5 for imagemagick.org
commit 80b268ce527b1a7f36c3ce2dc755cb2ff20f44ab
Author: Cristy <urban-warrior@imagemagick.org>
Date: Wed Jun 24 19:30:21 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-xv2g-79vc-75qf
diff --git a/coders/pdb.c b/coders/pdb.c
index 00d4e2f0f..63ab0119b 100644
--- a/coders/pdb.c
+++ b/coders/pdb.c
@@ -414,6 +414,9 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (status == MagickFalse)
return(DestroyImageList(image));
packets=(bits_per_pixel*image->columns+7)/8;
+ if (((packets+257UL) > GetBlobSize(image)) ||
+ (image->rows > GetBlobSize(image)))
+ ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
pixels=(unsigned char *) AcquireQuantumMemory(packets+257UL,image->rows*
sizeof(*pixels));
if (pixels == (unsigned char *) NULL)