diff options
-rw-r--r-- | converter/other/giftopnm.c | 7 | ||||
-rw-r--r-- | doc/HISTORY | 5 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 13 insertions, 1 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; diff --git a/doc/HISTORY b/doc/HISTORY index bcd928c6..7126c1f9 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,11 @@ Netpbm. CHANGE HISTORY -------------- +15.03.29 BJH Release 10.69.07 + + giftopnm: Fix bug: crashes if purported GIF has neither a global + color map nor a local one. + 15.03.03 BJH Release 10.69.06 pamtosvg: fix use of unset variable; probably results in a diff --git a/version.mk b/version.mk index c05dacd0..9c587ca4 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 69 -NETPBM_POINT_RELEASE = 6 +NETPBM_POINT_RELEASE = 7 |