From ed51e0e32b1ca2f505d0c1149c3728bc02f26f07 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Tue, 17 Dec 2024 19:23:56 +0100 Subject: [PATCH] Corrected bytes per line check that should be 250 instead of 200 (https://github.com/ImageMagick/ImageMagick/issues/7837) --- coders/pict.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coders/pict.c b/coders/pict.c index 709d03a0b..822b012e9 100644 --- a/coders/pict.c +++ b/coders/pict.c @@ -502,7 +502,7 @@ static unsigned char *DecodeImage(Image *blob,Image *image, for (y=0; y < (ssize_t) image->rows; y++) { q=pixels+y*width; - if (bytes_per_line > 200) + if (bytes_per_line > 250) scanline_length=ReadBlobMSBShort(blob); else scanline_length=(size_t) ReadBlobByte(blob); @@ -692,7 +692,7 @@ static size_t EncodeImage(Image *image,const unsigned char *scanline, Write the number of and the packed length. */ length=(size_t) (q-pixels); - if (bytes_per_line > 200) + if (bytes_per_line > 250) { (void) WriteBlobMSBShort(image,(unsigned short) length); length+=2; @@ -1097,7 +1097,7 @@ static Image *ReadPICTImage(const ImageInfo *image_info, if (EOFBlob(image) != MagickFalse) break; - if (length > 200) + if (length > 250) scanline_length=ReadBlobMSBShort(image); else scanline_length=ReadBlobByte(image);