about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-27 18:33:15 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-27 18:33:15 +0000
commit5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f (patch)
treef11d76c7176d0ef0e5c07a3af6f895538fc6317c
parent77fb425477358f9af21e38d2f5e55d9de1375a75 (diff)
downloadnetpbm-mirror-5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f.tar.gz
netpbm-mirror-5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f.tar.xz
netpbm-mirror-5714a63997a2a34bda5d2b6f682cdcc63fbcfc9f.zip
Release 10.47.45
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@1960 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/giftopnm.c1
-rw-r--r--converter/other/pnmtopng.c8
-rw-r--r--converter/ppm/ppmtoxpm.c4
-rw-r--r--doc/HISTORY34
-rw-r--r--editor/pnmremap.c20
-rw-r--r--generator/ppmforge.c5
-rw-r--r--lib/libppmcolor.c5
-rw-r--r--version.mk2
8 files changed, 74 insertions, 5 deletions
diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c
index 4d2d720b..9c6db046 100644
--- a/converter/other/giftopnm.c
+++ b/converter/other/giftopnm.c
@@ -1028,6 +1028,7 @@ lzwReadByte(struct decompressor * const decompP,
                         *endOfImageP = TRUE;
                         *errorP = NULL;
                     } else {
+                        *endOfImageP = FALSE;
                         expandCodeOntoStack(decompP, code, errorP);
                         if (!*errorP)
                             *dataReadP = popStack(&decompP->stack);
diff --git a/converter/other/pnmtopng.c b/converter/other/pnmtopng.c
index ee4be331..52f69423 100644
--- a/converter/other/pnmtopng.c
+++ b/converter/other/pnmtopng.c
@@ -1835,6 +1835,7 @@ computeColorMap(FILE *         const ifP,
                 int            const cols,
                 int            const rows,
                 xelval         const maxval,
+                int            const pnmType,
                 int            const format,
                 bool           const force,
                 FILE *         const pfP,
@@ -1882,7 +1883,7 @@ computeColorMap(FILE *         const ifP,
                   maxval, PALETTEMAXVAL);
     else {
         unsigned int bitsPerPixel;
-        computePixelWidth(PNM_FORMAT_TYPE(format), pnm_meaningful_bits, alpha,
+        computePixelWidth(pnmType, pnm_meaningful_bits, alpha,
                           NULL, &bitsPerPixel);
 
         if (!pfP && bitsPerPixel == 1)
@@ -2568,7 +2569,7 @@ convertpnm(struct cmdlineInfo const cmdline,
   findRedundantBits(ifp, rasterPos, cols, rows, maxval, format, alpha,
                     cmdline.force, &pnm_meaningful_bits);
   
-  computeColorMap(ifp, rasterPos, cols, rows, maxval, format,
+  computeColorMap(ifp, rasterPos, cols, rows, maxval, pnm_type, format,
                   cmdline.force, pfp,
                   alpha, transparent >= 0, transcolor, transexact, 
                   !!cmdline.background, backcolor,
@@ -2870,3 +2871,6 @@ main(int argc, char *argv[]) {
 
     return errorlevel;
 }
+
+
+
diff --git a/converter/ppm/ppmtoxpm.c b/converter/ppm/ppmtoxpm.c
index 18ea61a8..fc8ba9d7 100644
--- a/converter/ppm/ppmtoxpm.c
+++ b/converter/ppm/ppmtoxpm.c
@@ -636,8 +636,10 @@ main(int argc, char *argv[]) {
 
     if (cmdline.hexonly)
         colornameHash = NULL;
+    else if (cmdline.rgb)
+        ppm_readcolornamefile(cmdline.rgb, TRUE, &colornameHash, &colornames);
     else
-        ppm_readcolornamefile(cmdline.rgb, FALSE, &colornameHash, &colornames);
+        ppm_readcolornamefile(NULL, FALSE, &colornameHash, &colornames);
 
     /* Now generate the character-pixel colormap table. */
     genCmap(chv, ncolors, maxval, 
diff --git a/doc/HISTORY b/doc/HISTORY
index 154d05d9..60ec70ec 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,40 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+13.06.27 BJH  Release 10.47.45
+
+              giftopnm: fix bug: erroneously claims GIF ends prematurely.
+              Broken in Netpbm 10.38 (March 2007).  This affects all GIFs, but
+              the problem does not manifest when Netpbm was built with Gcc
+              from 2007 and later.
+
+              ppmforge. fix crash when -mesh is 1 or less.  Always broken
+              (program was added in Pbmplus (October 1991).  Thanks Prophet of
+              the Way <afu@wta.att.ne.jp>.
+
+              ppmforge: fix array bounds violation.  Always broken (program
+              was added in Pbmplus (October 1991).  Thanks Prophet of the Way
+              <afu@wta.att.ne.jp>.
+
+              pnmtopng: fix bug: output bigger than it needs to be when the
+              input is a color format image that contains only gray.  Broken
+              since at least Netpbm 10.26 (May 2001), but after 10.18
+              (September 2003).  Thanks Ludolf Holzheid
+              (lholzheid@bihl-wiedemann.de).
+
+              pnmremap (ergo pnmquant): fix bug: incorrect output with
+              -norandom and floyd-steinberg dithering.  Always broken.
+              (-norandom was introduced in Netpbm 10.39 (June 2007)).
+
+              ppmtoxpm: fix bug: ignores inability to open the specified color
+              dictionary file (-rgb) and just doesn't use color names.
+              Introduced in Netpbm 10.15 (April 2003).
+
+              libnetpbm: fix bug: ppm_freecolornames() has wild pointer
+              dereference when the color name table was generated empty
+              because the color dictionary file was not openable.  ppmtoxpm
+              suffers from this.  Broken in 10.15 (April 2003).
+
 13.05.03 BJH  Release 10.47.44
 
               ppmtowinicon: fix bug: sometimes creates image truncated in the
diff --git a/editor/pnmremap.c b/editor/pnmremap.c
index 5b58addb..db35e2c0 100644
--- a/editor/pnmremap.c
+++ b/editor/pnmremap.c
@@ -377,6 +377,24 @@ randomizeError(long **      const err,
 
 
 static void
+zeroError(long **      const err,
+          unsigned int const width,
+          unsigned int const depth) {
+/*----------------------------------------------------------------------------
+   Set all errors to zero in the error array err[][].
+-----------------------------------------------------------------------------*/
+    unsigned int col;
+
+    for (col = 0; col < width; ++col) {
+        unsigned int plane;
+        for (plane = 0; plane < depth; ++plane) 
+            err[plane][col] = 0;
+    }
+}
+
+
+
+static void
 fserrSetForward(struct fserr * const fserrP) {
 
     fserrP->fsForward = TRUE;
@@ -433,6 +451,8 @@ initFserr(struct pam *   const pamP,
 
     if (initRandom)
         randomizeError(fserrP->thiserr, fserrSize, pamP->depth);
+    else
+        zeroError(fserrP->thiserr, fserrSize, pamP->depth);
 
     fserrSetForward(fserrP);
 }
diff --git a/generator/ppmforge.c b/generator/ppmforge.c
index 80e35822..c77076e3 100644
--- a/generator/ppmforge.c
+++ b/generator/ppmforge.c
@@ -491,7 +491,7 @@ createPlanetStuff(float *          const a,
             double const bx = (n - 1) * uprj(j, cols);
             
             bxf[j] = floor(bx);
-            bxc[j] = bxf[j] + 1;
+            bxc[j] = MIN(bxf[j] + 1, n - 1);
             u[j] = bx - bxf[j];
             u1[j] = 1 - u[j];
         }
@@ -1051,6 +1051,9 @@ main(int argc, char ** argv) {
             if ((i == argc) || (sscanf(argv[i], "%d", &meshsize) != 1))
                 pm_usage(usage);
 
+            if (meshsize < 2)
+                pm_error("mesh must be at least 2");
+
             /* Force FFT mesh to the next larger power of 2. */
 
             for (j = meshsize; (j & 1) == 0; j >>= 1) ;
diff --git a/lib/libppmcolor.c b/lib/libppmcolor.c
index 7e324185..58663c94 100644
--- a/lib/libppmcolor.c
+++ b/lib/libppmcolor.c
@@ -598,6 +598,11 @@ readColorFile(const char *    const fileName,
                empty file
             */
             *nColorsP = 0;
+            {
+                unsigned int i;
+                for (i = 0; i < MAXCOLORNAMES; ++i)
+                    colornames[i] = NULL;
+            }
             *errorP = NULL;
         } else {
             readOpenColorFile(colorFileP, nColorsP, colornames, colors, cht,
diff --git a/version.mk b/version.mk
index ecc11ea5..bb5d49b8 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 47
-NETPBM_POINT_RELEASE = 44
+NETPBM_POINT_RELEASE = 45