From: Cristy Date: Sun, 5 Jun 2016 20:33:06 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/213 X-Git-Tag: 7.0.1-10~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14ba9affc84ec2b98fddefe2423471c338d4e427;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/213 --- diff --git a/ChangeLog b/ChangeLog index 6164e2641..cbe3802d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ convert caption:@mytext.txt ... * RLE check for pixel offset less than 0 (heap overflow report from Craig Young). + * Properly initialze PES blocks (reference + https://github.com/ImageMagick/ImageMagick/issues/213). 2016-06-03 7.0.1-9 Cristy * Release ImageMagick version 7.0.1-9, GIT revision 10847:339f803:20160602. diff --git a/coders/pes.c b/coders/pes.c index f18219ba9..d05187fa2 100644 --- a/coders/pes.c +++ b/coders/pes.c @@ -509,7 +509,10 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception) blocks[i].offset=0; } for ( ; i < 256L; i++) + { blocks[i].offset=0; + blocks[i].color=PESColor; + } if (DiscardBlobBytes(image,532L-number_colors-21) == MagickFalse) ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile", image->filename); @@ -555,7 +558,7 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception) Normal stitch. */ if ((x & 0x40) != 0) - x-=0x80; + x-=0x80; } else {