Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/85
  • Loading branch information
Cristy committed Nov 4, 2017
1 parent cab00b6 commit 2130bf6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coders/wpg.c
Expand Up @@ -1050,7 +1050,9 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
WPG_Palette.StartIndex=ReadBlobLSBShort(image);
WPG_Palette.NumOfEntries=ReadBlobLSBShort(image);
if ((WPG_Palette.NumOfEntries-WPG_Palette.StartIndex) >
(Rec2.RecordLength-2-2) / 3)
(Rec2.RecordLength-2-2)/3)
ThrowReaderException(CorruptImageError,"InvalidColormapIndex");
if (WPG_Palette.StartIndex > WPG_Palette.NumOfEntries)
ThrowReaderException(CorruptImageError,"InvalidColormapIndex");
image->colors=WPG_Palette.NumOfEntries;
if (!AcquireImageColormap(image,image->colors,exception))
Expand Down

0 comments on commit 2130bf6

Please sign in to comment.