GraphicsMagick: coders/wpg.c Prevent addition of two uint_16_t o...
GraphicsMagick Commits <[email protected]> Sat, 21 Oct 2023 10:35:58 -0500
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.10815.1697902568.7975.graphicsmagick-commit@lists.sourceforge.net> |
changeset be9614494006 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=be9614494006
summary: coders/wpg.c Prevent addition of two uint_16_t overflow.
diffstat:
coders/wpg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 5fea8d88557e -r be9614494006 coders/wpg.c
--- a/coders/wpg.c Sat Oct 21 12:26:40 2023 +0200
+++ b/coders/wpg.c Sat Oct 21 17:35:28 2023 +0200
@@ -1415,7 +1415,7 @@
case 0x0E: /*Color palette */
LoadPaletteRec(image,&WPG_Palette,logging);
PaletteItems = WPG_Palette.NumOfEntries;
- if(PaletteItems + WPG_Palette.StartIndex > 256)
+ if((magick_uint32_t)PaletteItems + WPG_Palette.StartIndex > 256)
ThrowReaderException(CorruptImageError,ColormapExceedsColorsLimit,image);
if(pPalette==NULL)
{