diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-03-29 03:08:52 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-03-29 03:08:52 +0000 |
commit | 04c4c8a3ce3ccb391877c25039c52a1a9cc07bd4 (patch) | |
tree | e9ed1bee77324b4d4f60ef34fe762a613990537e /converter | |
parent | 4dd6c22b547dfe80a97486d7a4cd25c9a1de14df (diff) | |
download | netpbm-mirror-04c4c8a3ce3ccb391877c25039c52a1a9cc07bd4.tar.gz netpbm-mirror-04c4c8a3ce3ccb391877c25039c52a1a9cc07bd4.tar.xz netpbm-mirror-04c4c8a3ce3ccb391877c25039c52a1a9cc07bd4.zip |
Release 10.69.07
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2436 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/giftopnm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c index 96a6fc4c..239e5100 100644 --- a/converter/other/giftopnm.c +++ b/converter/other/giftopnm.c @@ -1754,6 +1754,8 @@ readGifHeader(FILE * const gifFileP, gifScreenP->hasGray ? "contains" : "doesn't contain", gifScreenP->hasColor ? "contains" : "doesn't contain"); } + } else { + gifScreenP->ColorMap.size = 0; } if (gifScreenP->AspectRatio != 0 && gifScreenP->AspectRatio != 49) @@ -1948,6 +1950,11 @@ convertImage(FILE * const ifP, validateWithinGlobalScreen(imageHeader, gifScreen); if (imageHeader.useGlobalColormap) { + if (gifScreen.ColorMap.size == 0) { + pm_error("Invalid GIF: " + "Image has no local color map and stream has no global " + "color map either."); + } currentColorMapP = &gifScreen.ColorMap; hasGray = gifScreen.hasGray; hasColor = gifScreen.hasColor; |