about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-01-22 19:01:08 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-01-22 19:01:08 +0000
commit00e73ee5efa865643eaad76565c7375f3fa834be (patch)
treed2623539a08941402dc17f14d9183b50b8509e34
parent64f542175bd276397a333b73397ac3e2d7effaf3 (diff)
downloadnetpbm-mirror-00e73ee5efa865643eaad76565c7375f3fa834be.tar.gz
netpbm-mirror-00e73ee5efa865643eaad76565c7375f3fa834be.tar.xz
netpbm-mirror-00e73ee5efa865643eaad76565c7375f3fa834be.zip
Release 10.86.28
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4254 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--analyzer/pgmtexture.c3
-rw-r--r--converter/ppm/picttoppm.c6
-rw-r--r--converter/ppm/ppmtoilbm.c1
-rw-r--r--doc/HISTORY14
-rw-r--r--other/pamendian.c2
-rw-r--r--version.mk2
6 files changed, 24 insertions, 4 deletions
diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c
index 58833277..4e0dd4d5 100644
--- a/analyzer/pgmtexture.c
+++ b/analyzer/pgmtexture.c
@@ -95,6 +95,7 @@ vector(unsigned int const nl,
        unsigned int const nh) {
 
     float * v;
+    unsigned int i;
 
     assert(nh >= nl);
 
@@ -103,6 +104,8 @@ vector(unsigned int const nl,
     if (v == NULL)
         pm_error("Unable to allocate memory for a vector.");
 
+    for(i = 0; i < nh - nl +1; ++i)
+        v[i] = 0;
     return v - nl;
 }
 
diff --git a/converter/ppm/picttoppm.c b/converter/ppm/picttoppm.c
index 06074684..21030b03 100644
--- a/converter/ppm/picttoppm.c
+++ b/converter/ppm/picttoppm.c
@@ -1273,7 +1273,7 @@ doDiffSize(struct Rect       const clipsrc,
     }
     break;
     case 32: {
-        unsigned int const planeSize = srcwid / 4;
+        unsigned int const planeSize = rectwidth(&srcRect);
         unsigned int rowNumber;
 
         for (rowNumber = 0; rowNumber < ysize; ++rowNumber) {
@@ -1443,7 +1443,7 @@ doSameSize(transfer_func           trf,
         }
     } break;
     case 32: {
-        unsigned int const planeSize = srcwid / 4;
+        unsigned int const planeSize = xsize;
         unsigned int rowNumber;
 
         for (rowNumber = 0; rowNumber < ysize; ++rowNumber) {
@@ -1526,7 +1526,7 @@ blitIdempotent(unsigned int          const pixSize,
         }
     } break;
     case 32: {
-        unsigned int const planeSize = srcwid / 4;
+        unsigned int const planeSize = xsize;
         unsigned int rowNumber;
 
         for (rowNumber = 0; rowNumber < ysize; ++rowNumber) {
diff --git a/converter/ppm/ppmtoilbm.c b/converter/ppm/ppmtoilbm.c
index 595aa3f4..c5fa4d00 100644
--- a/converter/ppm/ppmtoilbm.c
+++ b/converter/ppm/ppmtoilbm.c
@@ -2274,6 +2274,7 @@ main(int argc, char ** argv) {
         if (colors == 0)
             pm_error("empty colormap??");
         pm_message("%d colors found in colormap", colors);
+        nPlanes = pm_maxvaltobits(colors-1);
     }
 
     if (maskmethod != mskNone) {
diff --git a/doc/HISTORY b/doc/HISTORY
index fe3f8da2..10729e56 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,20 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+22.01.22 BJH  Release 10.86.28
+ 
+              picttoppm: Fix incorrect output for 32 bit per pixel images
+              that have only 3 planes.  Broken in Netpbm 10.34 (June 2006).
+
+              pamendian: fix bogus "sample exceeds maxval" failure.
+              Introduced in Netpbm 10.66 (March 2014).
+
+              ppmtoilbm: Fix wild memory references and hangs with -map .
+              Introduced in Netpbm 9.12 (March 2001).
+
+              pgmtexture: Fix incorrect output.  Always broken.  (Program was
+              added in primordial Netpbm in 1991).
+              
 21.11.28 BJH  Release 10.86.27
 
               palmtopnm: Fix bug: fails with PackBits input on platform with
diff --git a/other/pamendian.c b/other/pamendian.c
index d82ebd38..c24d9629 100644
--- a/other/pamendian.c
+++ b/other/pamendian.c
@@ -49,6 +49,8 @@ int main(int argc, char *argv[]) {
     intuplerow = pnm_allocpamrow(&inpam);      
     outtuplerow = pnm_allocpamrow(&outpam);
 
+    inpam.maxval = 65535;
+
     for (row = 0; row < inpam.height; row++) {
         unsigned int col;
         pnm_readpamrow(&inpam, intuplerow);
diff --git a/version.mk b/version.mk
index b68010ef..08e54cbf 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 86
-NETPBM_POINT_RELEASE = 27
+NETPBM_POINT_RELEASE = 28