about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-09-13 15:45:04 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-09-13 15:45:04 +0000
commit8bdace1a332a39236338485b73898a81a88e757e (patch)
tree799956243bead596058d4787b98036818b10fbe6
parent778a245464d8b91ae4e567da2757fe5a523df4bf (diff)
downloadnetpbm-mirror-8bdace1a332a39236338485b73898a81a88e757e.tar.gz
netpbm-mirror-8bdace1a332a39236338485b73898a81a88e757e.tar.xz
netpbm-mirror-8bdace1a332a39236338485b73898a81a88e757e.zip
Release 10.78.06
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3060 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/pnmtopalm/palmtopnm.c11
-rw-r--r--doc/HISTORY6
-rw-r--r--version.mk2
3 files changed, 18 insertions, 1 deletions
diff --git a/converter/other/pnmtopalm/palmtopnm.c b/converter/other/pnmtopalm/palmtopnm.c
index 00aa35e4..0f76207d 100644
--- a/converter/other/pnmtopalm/palmtopnm.c
+++ b/converter/other/pnmtopalm/palmtopnm.c
@@ -688,6 +688,11 @@ doTransparent(FILE *                 const ofP,
                                                colormap->ncolors,
                                                sizeof(color), 
                                                palmcolor_compare_indices));
+            if (!actualColor)
+                pm_error("Invalid input; transparent index %u "
+                         "is not among the %u colors in the image's colormap",
+                         transparentIndex, colormap->ncolors);
+
             fprintf(ofP, "#%02x%02x%02x\n", 
                    (unsigned int) ((*actualColor >> 16) & 0xFF),
                    (unsigned int) ((*actualColor >>  8) & 0xFF), 
@@ -1020,6 +1025,12 @@ convertRowToPnmNotDirect(const unsigned char * const palmrow,
                                                   colormap->ncolors,
                                                   sizeof(color2), 
                                                   palmcolor_compare_indices));
+            if (!actualColor)
+                pm_error("Invalid input.  A color index in column %u "
+                         "is %u, which is not among the %u colors "
+                         "in the colormap",
+                         j, color, colormap->ncolors);
+
             PPM_ASSIGN(xelrow[j], 
                        (*actualColor >> 16) & 0xFF, 
                        (*actualColor >>  8) & 0xFF, 
diff --git a/doc/HISTORY b/doc/HISTORY
index c859fe42..c6f84b3a 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,12 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+17.09.13 BJH  Release 10.78.06
+
+              palmtopnm: fix crash if invalid input contains color index that
+              is not in the palette.  Always broken (palmtopnm was new in
+              Netpbm 9.10 (October 2001)).
+
 17.09.10 BJH  Release 10.79.05
 
               pnmtopalm: fix incorrect output with certain input files and
diff --git a/version.mk b/version.mk
index 71e25303..6f219ffa 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 79
-NETPBM_POINT_RELEASE = 5
+NETPBM_POINT_RELEASE = 6