about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-09-28 01:24:37 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-09-28 01:24:37 +0000
commitfd89b0bdc07ab7da700fcfeffd4093549e2ff5c2 (patch)
tree916cf669061d89f0ce7331a45d099cc30e7f86a8
parent1472db408ce70f13c4423a58dfe47f023ef0dd5f (diff)
downloadnetpbm-mirror-fd89b0bdc07ab7da700fcfeffd4093549e2ff5c2.tar.gz
netpbm-mirror-fd89b0bdc07ab7da700fcfeffd4093549e2ff5c2.tar.xz
netpbm-mirror-fd89b0bdc07ab7da700fcfeffd4093549e2ff5c2.zip
Release 10.47.66
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@3077 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/pnmtopalm/palmtopnm.c11
-rw-r--r--converter/pbm/pbmtoibm23xx.c2
-rw-r--r--doc/HISTORY13
-rw-r--r--editor/ppmbrighten.c2
-rw-r--r--lib/libpbmfont.c2
-rw-r--r--version.mk2
6 files changed, 28 insertions, 4 deletions
diff --git a/converter/other/pnmtopalm/palmtopnm.c b/converter/other/pnmtopalm/palmtopnm.c
index 88088817..e686571b 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/converter/pbm/pbmtoibm23xx.c b/converter/pbm/pbmtoibm23xx.c
index a83e260d..334b649d 100644
--- a/converter/pbm/pbmtoibm23xx.c
+++ b/converter/pbm/pbmtoibm23xx.c
@@ -4,7 +4,7 @@
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version
- * 2 as published by the Free Software Foundation.
+ * 2 or later as published by the Free Software Foundation.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/doc/HISTORY b/doc/HISTORY
index 5d07cde1..48cd3f64 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,19 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+not yet  BJH  Release 10.47.66
+
+              ppmbrighten: fix bug: red pixels change hue.  Introduced in
+              after Netpbm 10.11 (October 2002) and before Netpbm 10.18
+              (September 2003).
+
+              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)).
+
+              libnetpbm: font facilities: fix invalid memory reference with
+              certain font files.
+
 17.06.28 BJH  Release 10.47.65
 
               pamgauss: Fix skewed output with even dimension.  Always broken
diff --git a/editor/ppmbrighten.c b/editor/ppmbrighten.c
index 9bcf7bb5..49f05c3a 100644
--- a/editor/ppmbrighten.c
+++ b/editor/ppmbrighten.c
@@ -102,7 +102,7 @@ parseCommandLine(int argc, char ** argv,
 static __inline__ unsigned int
 mod(int const dividend, unsigned int const divisor) {
 
-    int remainder = dividend % divisor;
+    int remainder = dividend % (int)divisor;
 
     if (remainder < 0)
         return divisor + remainder;
diff --git a/lib/libpbmfont.c b/lib/libpbmfont.c
index 1938e754..2e6e66c1 100644
--- a/lib/libpbmfont.c
+++ b/lib/libpbmfont.c
@@ -1088,7 +1088,7 @@ mk_argvn(char *        const s,
             *p++ = '\0';
         else {
             vec[n++] = p;
-            if (n >= mk_max)
+            if (n >= mk_max-1)
                 break;
             while (*p && !ISSPACE(*p))
                 ++p;
diff --git a/version.mk b/version.mk
index 60ee9b24..c3a7c95a 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 47
-NETPBM_POINT_RELEASE = 65
+NETPBM_POINT_RELEASE = 66