From 00e73ee5efa865643eaad76565c7375f3fa834be Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 22 Jan 2022 19:01:08 +0000 Subject: Release 10.86.28 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4254 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- analyzer/pgmtexture.c | 3 +++ converter/ppm/picttoppm.c | 6 +++--- converter/ppm/ppmtoilbm.c | 1 + doc/HISTORY | 14 ++++++++++++++ other/pamendian.c | 2 ++ version.mk | 2 +- 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 -- cgit 1.4.1