Skip to content

Commit

Permalink
Corrected bytes per line check that should be 250 instead of 200 (Ima…
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Dec 17, 2024
1 parent 3a2476f commit ed51e0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions coders/pict.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ed51e0e

Please sign in to comment.