From 9900b27807f9e8b23993d55b1406e6d688b9e965eacc2cc21646ba4eb289adf4 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Fri, 23 Jun 2023 09:18:14 +0000 Subject: [PATCH] - version update to 11.2.0 * jpegtopnm: Add -traceexif * pbmtextps: Add -asciihex, -ascii85. * pcdovtoppm: remove dependency on obsolete 'tempfile' program. * jpegtopnm: Many fixes to -dumpexif. Always broken. (-dumpexif was new in Netpbm 9.18 (September 2001)) * pamtopng: fix -chroma option: always rejected. Always broken. (pamtopng was new in Netpbm 10.70 (June 2015)). * pnmtopng: fix -rgb option: always rejected. Always broken (-rgb was new in Netpbm 10.30 (October 2005)). * build: change the way you add the separately distributed 'hpcdtoppm' code to the build. * lot of changes since last version update, see https://sourceforge.net/p/netpbm/code/HEAD/tree/advanced/doc/HISTORY - modified patches % netpbm-gcc-warnings.patch (refreshed) % netpbm-security-code.patch (refreshed) % netpbm-security-scripts.patch (refreshed) - deleted patches - netpbm-tmpfile.patch (upstreamed) - ppmforge-fix-overflow.patch (upstreamed) - signed-char.patch (upstreamed) OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=143 --- netpbm-10.96.4-documentation.tar.bz2 | 3 - ...bm-10.96.4-nohpcdtoppm-noppmtompeg.tar.bz2 | 3 - netpbm-11.2.0-documentation.tar.bz2 | 3 + netpbm-11.2.0-nohpcdtoppm-noppmtompeg.tar.bz2 | 3 + netpbm-gcc-warnings.patch | 20 +- netpbm-security-code.patch | 573 ++++++++---------- netpbm-security-scripts.patch | 275 +-------- netpbm-tmpfile.patch | 13 - netpbm.changes | 26 + netpbm.spec | 13 +- ppmforge-fix-overflow.patch | 182 ------ signed-char.patch | 13 - 12 files changed, 314 insertions(+), 813 deletions(-) delete mode 100644 netpbm-10.96.4-documentation.tar.bz2 delete mode 100644 netpbm-10.96.4-nohpcdtoppm-noppmtompeg.tar.bz2 create mode 100644 netpbm-11.2.0-documentation.tar.bz2 create mode 100644 netpbm-11.2.0-nohpcdtoppm-noppmtompeg.tar.bz2 delete mode 100644 netpbm-tmpfile.patch delete mode 100644 ppmforge-fix-overflow.patch delete mode 100644 signed-char.patch diff --git a/netpbm-10.96.4-documentation.tar.bz2 b/netpbm-10.96.4-documentation.tar.bz2 deleted file mode 100644 index 4f24dde..0000000 --- a/netpbm-10.96.4-documentation.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ee4adb85045544aadf604069cf3ce0288447be56353bb0d27c1df46557957315 -size 923460 diff --git a/netpbm-10.96.4-nohpcdtoppm-noppmtompeg.tar.bz2 b/netpbm-10.96.4-nohpcdtoppm-noppmtompeg.tar.bz2 deleted file mode 100644 index 7c2e88a..0000000 --- a/netpbm-10.96.4-nohpcdtoppm-noppmtompeg.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b257d6f86f130708d8272e8517aca49f7901aedbba8985abbe0fdbd5a813d31 -size 1995092 diff --git a/netpbm-11.2.0-documentation.tar.bz2 b/netpbm-11.2.0-documentation.tar.bz2 new file mode 100644 index 0000000..e783cf4 --- /dev/null +++ b/netpbm-11.2.0-documentation.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7e45f7d20052acf13f11d72e031dbef709884f18354c3bffd4d089ac4cd0631 +size 12263828 diff --git a/netpbm-11.2.0-nohpcdtoppm-noppmtompeg.tar.bz2 b/netpbm-11.2.0-nohpcdtoppm-noppmtompeg.tar.bz2 new file mode 100644 index 0000000..2aae54a --- /dev/null +++ b/netpbm-11.2.0-nohpcdtoppm-noppmtompeg.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c67e4ff7af6436c669b0acb750b65990fb9c1043186ed4e1c3449dca06ba1ef5 +size 2008164 diff --git a/netpbm-gcc-warnings.patch b/netpbm-gcc-warnings.patch index dff7ca5..39a20a9 100644 --- a/netpbm-gcc-warnings.patch +++ b/netpbm-gcc-warnings.patch @@ -1,7 +1,7 @@ -Index: netpbm-10.96.4/converter/other/pngx.c +Index: netpbm-11.2.0/converter/other/pngx.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/pngx.c 2021-12-13 13:11:50.248594206 +0100 -+++ netpbm-10.96.4/converter/other/pngx.c 2021-12-13 13:23:28.772862475 +0100 +--- netpbm-11.2.0.orig/converter/other/pngx.c ++++ netpbm-11.2.0/converter/other/pngx.c @@ -368,6 +368,7 @@ pngx_srgbIntentDesc(pngx_srgbIntent cons case PNGX_ABSOLUTE_COLORIMETRIC: return "ABSOLUTE_COLORIMETRIC"; } @@ -18,10 +18,10 @@ Index: netpbm-10.96.4/converter/other/pngx.c } -Index: netpbm-10.96.4/lib/libpm.c +Index: netpbm-11.2.0/lib/libpm.c =================================================================== ---- netpbm-10.96.4.orig/lib/libpm.c 2021-12-13 13:23:28.760862403 +0100 -+++ netpbm-10.96.4/lib/libpm.c 2021-12-13 13:23:28.776862501 +0100 +--- netpbm-11.2.0.orig/lib/libpm.c ++++ netpbm-11.2.0/lib/libpm.c @@ -440,6 +440,7 @@ pm_maxvaltobits(int const maxval) { pm_error( "maxval of %d is too large!", maxval ); @@ -30,11 +30,11 @@ Index: netpbm-10.96.4/lib/libpm.c } int -Index: netpbm-10.96.4/lib/libpnm3.c +Index: netpbm-11.2.0/lib/libpnm3.c =================================================================== ---- netpbm-10.96.4.orig/lib/libpnm3.c 2021-12-13 13:11:56.508632602 +0100 -+++ netpbm-10.96.4/lib/libpnm3.c 2021-12-13 13:23:28.776862501 +0100 -@@ -429,6 +429,8 @@ pnm_bittoxel(bit const inputBit, +--- netpbm-11.2.0.orig/lib/libpnm3.c ++++ netpbm-11.2.0/lib/libpnm3.c +@@ -433,6 +433,8 @@ pnm_bittoxel(bit const inputBit, case PBM_WHITE: return pnm_whitexel(maxval, PBM_TYPE); break; default: assert(false); diff --git a/netpbm-security-code.patch b/netpbm-security-code.patch index 75edbb6..745e2d1 100644 --- a/netpbm-security-code.patch +++ b/netpbm-security-code.patch @@ -1,9 +1,9 @@ -Index: netpbm-10.96.4/analyzer/pgmtexture.c +Index: netpbm-11.2.0/analyzer/pgmtexture.c =================================================================== ---- netpbm-10.96.4.orig/analyzer/pgmtexture.c 2021-12-13 13:12:01.856665397 +0100 -+++ netpbm-10.96.4/analyzer/pgmtexture.c 2021-12-13 13:17:36.810714143 +0100 -@@ -53,7 +53,7 @@ vector(unsigned int const nl, - float * v; +--- netpbm-11.2.0.orig/analyzer/pgmtexture.c ++++ netpbm-11.2.0/analyzer/pgmtexture.c +@@ -63,7 +63,7 @@ vector(unsigned int const nl, + unsigned int i; assert(nh >= nl); - @@ -11,7 +11,7 @@ Index: netpbm-10.96.4/analyzer/pgmtexture.c MALLOCARRAY(v, (unsigned) (nh - nl + 1)); if (v == NULL) -@@ -85,6 +85,7 @@ matrix (unsigned int const nrl, +@@ -97,6 +97,7 @@ matrix (unsigned int const nrl, assert(nrh >= nrl); /* allocate pointers to rows */ @@ -19,7 +19,7 @@ Index: netpbm-10.96.4/analyzer/pgmtexture.c MALLOCARRAY(m, (unsigned) (nrh - nrl + 1)); if (m == NULL) pm_error("Unable to allocate memory for a matrix."); -@@ -92,7 +93,7 @@ matrix (unsigned int const nrl, +@@ -104,7 +105,7 @@ matrix (unsigned int const nrl, m -= ncl; assert (nch >= ncl); @@ -28,10 +28,10 @@ Index: netpbm-10.96.4/analyzer/pgmtexture.c /* allocate rows and set pointers to them */ for (i = nrl; i <= nrh; ++i) { MALLOCARRAY(m[i], (unsigned) (nch - ncl + 1)); -Index: netpbm-10.96.4/converter/other/gemtopnm.c +Index: netpbm-11.2.0/converter/other/gemtopnm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/gemtopnm.c 2021-12-13 13:11:49.684590746 +0100 -+++ netpbm-10.96.4/converter/other/gemtopnm.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/gemtopnm.c ++++ netpbm-11.2.0/converter/other/gemtopnm.c @@ -105,7 +105,7 @@ main(argc, argv) type = PPM_TYPE; @@ -41,11 +41,11 @@ Index: netpbm-10.96.4/converter/other/gemtopnm.c { /* allocate input row data structure */ int plane; -Index: netpbm-10.96.4/converter/other/jpegtopnm.c +Index: netpbm-11.2.0/converter/other/jpegtopnm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/jpegtopnm.c 2021-12-13 13:11:51.248600341 +0100 -+++ netpbm-10.96.4/converter/other/jpegtopnm.c 2021-12-13 13:17:36.810714143 +0100 -@@ -862,6 +862,8 @@ convertImage(FILE * +--- netpbm-11.2.0.orig/converter/other/jpegtopnm.c ++++ netpbm-11.2.0/converter/other/jpegtopnm.c +@@ -883,6 +883,8 @@ convertImage(FILE * /* Calculate output image dimensions so we can allocate space */ jpeg_calc_output_dimensions(cinfoP); @@ -54,10 +54,10 @@ Index: netpbm-10.96.4/converter/other/jpegtopnm.c /* Start decompressor */ jpeg_start_decompress(cinfoP); -Index: netpbm-10.96.4/converter/other/pbmtopgm.c +Index: netpbm-11.2.0/converter/other/pbmtopgm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/pbmtopgm.c 2021-12-13 13:11:50.244594183 +0100 -+++ netpbm-10.96.4/converter/other/pbmtopgm.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/pbmtopgm.c ++++ netpbm-11.2.0/converter/other/pbmtopgm.c @@ -60,6 +60,7 @@ main(int argc, char *argv[]) { @@ -66,10 +66,10 @@ Index: netpbm-10.96.4/converter/other/pbmtopgm.c maxval = MIN(PGM_OVERALLMAXVAL, width*height); pgm_writepgminit(stdout, cols, rows, maxval, 0) ; -Index: netpbm-10.96.4/converter/other/pnmtoddif.c +Index: netpbm-11.2.0/converter/other/pnmtoddif.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/pnmtoddif.c 2021-12-13 13:11:50.244594183 +0100 -+++ netpbm-10.96.4/converter/other/pnmtoddif.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/pnmtoddif.c ++++ netpbm-11.2.0/converter/other/pnmtoddif.c @@ -629,6 +629,7 @@ main(int argc, char *argv[]) { switch (PNM_FORMAT_TYPE(format)) { case PBM_TYPE: @@ -86,10 +86,10 @@ Index: netpbm-10.96.4/converter/other/pnmtoddif.c ip.bytes_per_line = 3 * cols; ip.bits_per_pixel = 24; ip.spectral = 5; -Index: netpbm-10.96.4/converter/other/pnmtojpeg.c +Index: netpbm-11.2.0/converter/other/pnmtojpeg.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/pnmtojpeg.c 2021-12-13 13:11:50.244594183 +0100 -+++ netpbm-10.96.4/converter/other/pnmtojpeg.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/pnmtojpeg.c ++++ netpbm-11.2.0/converter/other/pnmtojpeg.c @@ -606,7 +606,11 @@ read_scan_script(j_compress_ptr const ci want JPOOL_PERMANENT. */ @@ -120,10 +120,10 @@ Index: netpbm-10.96.4/converter/other/pnmtojpeg.c buffer = (*cinfo_p->mem->alloc_sarray) ((j_common_ptr) cinfo_p, JPOOL_IMAGE, (unsigned int) cinfo_p->image_width * cinfo_p->input_components, -Index: netpbm-10.96.4/converter/other/pnmtops.c +Index: netpbm-11.2.0/converter/other/pnmtops.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/pnmtops.c 2021-12-13 13:11:48.824585472 +0100 -+++ netpbm-10.96.4/converter/other/pnmtops.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/pnmtops.c ++++ netpbm-11.2.0/converter/other/pnmtops.c @@ -294,17 +294,21 @@ parseCommandLine(int argc, const char ** validateCompDimension(width, 72, "-width value"); validateCompDimension(height, 72, "-height value"); @@ -147,10 +147,10 @@ Index: netpbm-10.96.4/converter/other/pnmtops.c cmdlineP->imageheight = imageheight * 72; } else -Index: netpbm-10.96.4/converter/other/pnmtorle.c +Index: netpbm-11.2.0/converter/other/pnmtorle.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/pnmtorle.c 2021-12-13 13:11:50.248594206 +0100 -+++ netpbm-10.96.4/converter/other/pnmtorle.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/pnmtorle.c ++++ netpbm-11.2.0/converter/other/pnmtorle.c @@ -19,6 +19,8 @@ * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, @@ -160,10 +160,10 @@ Index: netpbm-10.96.4/converter/other/pnmtorle.c */ /* * pnmtorle - A program which will convert pbmplus (ppm or pgm) images -Index: netpbm-10.96.4/converter/other/pnmtosgi.c +Index: netpbm-11.2.0/converter/other/pnmtosgi.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/pnmtosgi.c 2021-12-13 13:11:50.252594232 +0100 -+++ netpbm-10.96.4/converter/other/pnmtosgi.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/pnmtosgi.c ++++ netpbm-11.2.0/converter/other/pnmtosgi.c @@ -185,6 +185,7 @@ buildChannels(FILE * const ifP, ScanElem * temp; @@ -172,10 +172,10 @@ Index: netpbm-10.96.4/converter/other/pnmtosgi.c MALLOCARRAY_NOFAIL(table, channels * rows); } else table = NULL; -Index: netpbm-10.96.4/converter/other/rletopnm.c +Index: netpbm-11.2.0/converter/other/rletopnm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/rletopnm.c 2021-12-13 13:11:51.244600317 +0100 -+++ netpbm-10.96.4/converter/other/rletopnm.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/rletopnm.c ++++ netpbm-11.2.0/converter/other/rletopnm.c @@ -19,6 +19,8 @@ * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, @@ -185,10 +185,10 @@ Index: netpbm-10.96.4/converter/other/rletopnm.c */ /* * rletopnm - A conversion program to convert from Utah's "rle" image format -Index: netpbm-10.96.4/converter/other/sgitopnm.c +Index: netpbm-11.2.0/converter/other/sgitopnm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/sgitopnm.c 2021-12-13 13:11:51.244600317 +0100 -+++ netpbm-10.96.4/converter/other/sgitopnm.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/sgitopnm.c ++++ netpbm-11.2.0/converter/other/sgitopnm.c @@ -377,10 +377,14 @@ readChannels(FILE * const ifP, MALLOCARRAY_NOFAIL(image, head->ysize); } else { @@ -205,10 +205,10 @@ Index: netpbm-10.96.4/converter/other/sgitopnm.c for (channel = 0; channel < maxchannel; ++channel) { unsigned int row; -Index: netpbm-10.96.4/converter/other/sirtopnm.c +Index: netpbm-11.2.0/converter/other/sirtopnm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/sirtopnm.c 2021-12-13 13:11:51.272600489 +0100 -+++ netpbm-10.96.4/converter/other/sirtopnm.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/sirtopnm.c ++++ netpbm-11.2.0/converter/other/sirtopnm.c @@ -69,6 +69,7 @@ char* argv[]; } break; @@ -217,10 +217,10 @@ Index: netpbm-10.96.4/converter/other/sirtopnm.c picsize = cols * rows * 3; planesize = cols * rows; if ( !( sirarray = (unsigned char*) malloc( picsize ) ) ) -Index: netpbm-10.96.4/converter/other/tifftopnm.c +Index: netpbm-11.2.0/converter/other/tifftopnm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/tifftopnm.c 2021-12-13 13:11:50.744597250 +0100 -+++ netpbm-10.96.4/converter/other/tifftopnm.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/tifftopnm.c ++++ netpbm-11.2.0/converter/other/tifftopnm.c @@ -1372,7 +1372,9 @@ convertRasterByRows(pnmOut * const if (scanbuf == NULL) pm_error("can't allocate memory for scanline buffer"); @@ -232,10 +232,10 @@ Index: netpbm-10.96.4/converter/other/tifftopnm.c if (samplebuf == NULL) pm_error("can't allocate memory for row buffer"); -Index: netpbm-10.96.4/converter/other/xwdtopnm.c +Index: netpbm-11.2.0/converter/other/xwdtopnm.c =================================================================== ---- netpbm-10.96.4.orig/converter/other/xwdtopnm.c 2021-12-13 13:11:49.684590746 +0100 -+++ netpbm-10.96.4/converter/other/xwdtopnm.c 2021-12-13 13:17:36.810714143 +0100 +--- netpbm-11.2.0.orig/converter/other/xwdtopnm.c ++++ netpbm-11.2.0/converter/other/xwdtopnm.c @@ -210,6 +210,10 @@ processX10Header(X10WDFileHeader * cons *colorsP = pnm_allocrow(2); PNM_ASSIGN1((*colorsP)[0], 0); @@ -247,7 +247,7 @@ Index: netpbm-10.96.4/converter/other/xwdtopnm.c *padrightP = (((h10P->pixmap_width + 15) / 16) * 16 - h10P->pixmap_width) * 8; *bits_per_itemP = 16; -@@ -635,6 +639,7 @@ processX11Header(X11WDFileHeader * cons +@@ -638,6 +642,7 @@ processX11Header(X11WDFileHeader * cons *colsP = h11FixedP->pixmap_width; *rowsP = h11FixedP->pixmap_height; @@ -255,10 +255,10 @@ Index: netpbm-10.96.4/converter/other/xwdtopnm.c *padrightP = h11FixedP->bytes_per_line * 8 - h11FixedP->pixmap_width * h11FixedP->bits_per_pixel; -Index: netpbm-10.96.4/converter/pbm/mdatopbm.c +Index: netpbm-11.2.0/converter/pbm/mdatopbm.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/mdatopbm.c 2021-12-13 13:11:51.256600390 +0100 -+++ netpbm-10.96.4/converter/pbm/mdatopbm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/mdatopbm.c ++++ netpbm-11.2.0/converter/pbm/mdatopbm.c @@ -245,10 +245,13 @@ main(int argc, char **argv) { pm_readlittleshort(infile, &yy); nInCols = yy; } @@ -274,23 +274,23 @@ Index: netpbm-10.96.4/converter/pbm/mdatopbm.c data = pbm_allocarray(nOutCols, nOutRows); -Index: netpbm-10.96.4/converter/pbm/mgrtopbm.c +Index: netpbm-11.2.0/converter/pbm/mgrtopbm.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/mgrtopbm.c 2021-12-13 13:17:36.814714167 +0100 -+++ netpbm-10.96.4/converter/pbm/mgrtopbm.c 2021-12-13 13:22:52.624641835 +0100 -@@ -104,6 +104,8 @@ readMgrHeader(FILE * const ifP, - +--- netpbm-11.2.0.orig/converter/pbm/mgrtopbm.c ++++ netpbm-11.2.0/converter/pbm/mgrtopbm.c +@@ -105,6 +105,8 @@ readMgrHeader(FILE * const ifP, interpHdrWidth (head, colsP); interpHdrHeight(head, rowsP); -+ + + overflow_add(*colsP, pad); - - *padrightP = ( ( *colsP + pad - 1 ) / pad ) * pad - *colsP; ++ + *padrightP = ((*colsP + pad - 1) / pad) * pad - *colsP; } -Index: netpbm-10.96.4/converter/pbm/pbmtogem.c + +Index: netpbm-11.2.0/converter/pbm/pbmtogem.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmtogem.c 2021-12-13 13:11:51.256600390 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmtogem.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmtogem.c ++++ netpbm-11.2.0/converter/pbm/pbmtogem.c @@ -79,6 +79,7 @@ putinit (int const rows, int const cols) bitsperitem = 0; bitshift = 7; @@ -299,10 +299,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmtogem.c outmax = (cols + 7) / 8; outrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char)); lastrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char)); -Index: netpbm-10.96.4/converter/pbm/pbmtogo.c +Index: netpbm-11.2.0/converter/pbm/pbmtogo.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmtogo.c 2021-12-13 13:11:51.340600906 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmtogo.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmtogo.c ++++ netpbm-11.2.0/converter/pbm/pbmtogo.c @@ -158,6 +158,7 @@ main(int argc, bitrow = pbm_allocrow(cols); @@ -311,10 +311,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmtogo.c rucols = ( cols + 7 ) / 8; bytesperrow = rucols; /* GraphOn uses bytes */ rucols = rucols * 8; -Index: netpbm-10.96.4/converter/pbm/pbmtolj.c +Index: netpbm-11.2.0/converter/pbm/pbmtolj.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmtolj.c 2021-12-13 13:11:51.364601052 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmtolj.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmtolj.c ++++ netpbm-11.2.0/converter/pbm/pbmtolj.c @@ -120,7 +120,11 @@ parseCommandLine(int argc, char ** argv, static void allocateBuffers(unsigned int const cols) { @@ -327,10 +327,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmtolj.c packBufferSize = rowBufferSize + (rowBufferSize + 127) / 128 + 1; deltaBufferSize = rowBufferSize + rowBufferSize / 8 + 10; -Index: netpbm-10.96.4/converter/pbm/pbmtomda.c +Index: netpbm-11.2.0/converter/pbm/pbmtomda.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmtomda.c 2021-12-13 13:11:51.572602329 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmtomda.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmtomda.c ++++ netpbm-11.2.0/converter/pbm/pbmtomda.c @@ -179,6 +179,7 @@ int main(int argc, char **argv) nOutRowsUnrounded = bScale ? nInRows/2 : nInRows; @@ -339,10 +339,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmtomda.c nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4; /* MDA wants rows a multiple of 4 */ nOutCols = nInCols / 8; -Index: netpbm-10.96.4/converter/pbm/pbmtoppa/pbm.c +Index: netpbm-11.2.0/converter/pbm/pbmtoppa/pbm.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmtoppa/pbm.c 2021-12-13 13:11:51.264600439 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmtoppa/pbm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmtoppa/pbm.c ++++ netpbm-11.2.0/converter/pbm/pbmtoppa/pbm.c @@ -154,6 +154,7 @@ pbm_readline(pbm_stat * const pbmSt break; case P4: { @@ -359,10 +359,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmtoppa/pbm.c pbmStatP->revdata = malloc ((pbmStatP->width+7)/8); memcpy(pbmStatP->revdata, data, (pbmStatP->width+7)/8); --pbmStatP->current_line; -Index: netpbm-10.96.4/converter/pbm/pbmtoppa/pbmtoppa.c +Index: netpbm-11.2.0/converter/pbm/pbmtoppa/pbmtoppa.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmtoppa/pbmtoppa.c 2021-12-13 13:11:51.264600439 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmtoppa/pbmtoppa.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmtoppa/pbmtoppa.c ++++ netpbm-11.2.0/converter/pbm/pbmtoppa/pbmtoppa.c @@ -453,6 +453,7 @@ main(int argc, char *argv[]) { pm_error("main(): unrecognized parameter '%s'", argv[argn]); } @@ -371,10 +371,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmtoppa/pbmtoppa.c Pwidth=(Width+7)/8; printer.fptr=out; -Index: netpbm-10.96.4/converter/pbm/pbmtoxbm.c +Index: netpbm-11.2.0/converter/pbm/pbmtoxbm.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmtoxbm.c 2021-12-13 13:11:51.368601078 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmtoxbm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmtoxbm.c ++++ netpbm-11.2.0/converter/pbm/pbmtoxbm.c @@ -353,6 +353,8 @@ convertRaster(FILE * const ifP, unsigned char * bitrow; unsigned int row; @@ -384,10 +384,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmtoxbm.c putinit(xbmVersion); bitrow = pbm_allocrow_packed(cols + padright); -Index: netpbm-10.96.4/converter/pbm/pbmto4425.c +Index: netpbm-11.2.0/converter/pbm/pbmto4425.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pbmto4425.c 2021-12-13 13:11:51.552602205 +0100 -+++ netpbm-10.96.4/converter/pbm/pbmto4425.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pbmto4425.c ++++ netpbm-11.2.0/converter/pbm/pbmto4425.c @@ -2,6 +2,7 @@ #include "nstring.h" @@ -405,10 +405,10 @@ Index: netpbm-10.96.4/converter/pbm/pbmto4425.c if(vmap == NULL) { pm_error( "Cannot allocate memory" ); -Index: netpbm-10.96.4/converter/pbm/pktopbm.c +Index: netpbm-11.2.0/converter/pbm/pktopbm.c =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/pktopbm.c 2021-12-13 13:11:51.376601127 +0100 -+++ netpbm-10.96.4/converter/pbm/pktopbm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/pktopbm.c ++++ netpbm-11.2.0/converter/pbm/pktopbm.c @@ -280,6 +280,7 @@ main(int argc, char *argv[]) { if (flagbyte == 7) { /* long form preamble */ integer packetlength = get32() ; /* character packet length */ @@ -417,10 +417,10 @@ Index: netpbm-10.96.4/converter/pbm/pktopbm.c endofpacket = packetlength + pktopbm_pkloc; /* calculate end of packet */ if ((car >= MAXPKCHAR) || !filename[car]) { -Index: netpbm-10.96.4/converter/pbm/thinkjettopbm.l +Index: netpbm-11.2.0/converter/pbm/thinkjettopbm.l =================================================================== ---- netpbm-10.96.4.orig/converter/pbm/thinkjettopbm.l 2021-12-13 13:11:51.572602329 +0100 -+++ netpbm-10.96.4/converter/pbm/thinkjettopbm.l 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pbm/thinkjettopbm.l ++++ netpbm-11.2.0/converter/pbm/thinkjettopbm.l @@ -114,7 +114,9 @@ DIG [0-9] \033\*b{DIG}+W { int l; @@ -440,10 +440,10 @@ Index: netpbm-10.96.4/converter/pbm/thinkjettopbm.l pbm_writepbminit(stdout, maxRowLength*8, rowCount, 0); packed_bitrow = malloc(maxRowLength); -Index: netpbm-10.96.4/converter/pgm/lispmtopgm.c +Index: netpbm-11.2.0/converter/pgm/lispmtopgm.c =================================================================== ---- netpbm-10.96.4.orig/converter/pgm/lispmtopgm.c 2021-12-13 13:11:54.848622422 +0100 -+++ netpbm-10.96.4/converter/pgm/lispmtopgm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pgm/lispmtopgm.c ++++ netpbm-11.2.0/converter/pgm/lispmtopgm.c @@ -58,6 +58,7 @@ main( argc, argv ) pm_error( "depth (%d bits) is too large", depth); @@ -463,10 +463,10 @@ Index: netpbm-10.96.4/converter/pgm/lispmtopgm.c *padrightP = ( ( *colsP + 31 ) / 32 ) * 32 - *colsP; if ( *colsP != (cols_32 - *padrightP) ) { -Index: netpbm-10.96.4/converter/pgm/psidtopgm.c +Index: netpbm-11.2.0/converter/pgm/psidtopgm.c =================================================================== ---- netpbm-10.96.4.orig/converter/pgm/psidtopgm.c 2021-12-13 13:11:54.852622445 +0100 -+++ netpbm-10.96.4/converter/pgm/psidtopgm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/pgm/psidtopgm.c ++++ netpbm-11.2.0/converter/pgm/psidtopgm.c @@ -78,6 +78,7 @@ main(int argc, pm_error("bits/sample (%d) is too large.", bitspersample); @@ -475,10 +475,10 @@ Index: netpbm-10.96.4/converter/pgm/psidtopgm.c grayrow = pgm_allocrow((cols + 7) / 8 * 8); for (row = 0; row < rows; ++row) { unsigned int col; -Index: netpbm-10.96.4/converter/ppm/ilbmtoppm.c +Index: netpbm-11.2.0/converter/ppm/ilbmtoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ilbmtoppm.c 2021-12-13 13:11:54.080617711 +0100 -+++ netpbm-10.96.4/converter/ppm/ilbmtoppm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ilbmtoppm.c ++++ netpbm-11.2.0/converter/ppm/ilbmtoppm.c @@ -608,6 +608,7 @@ decode_row(FILE * const ifP, rawtype *chp; @@ -550,10 +550,10 @@ Index: netpbm-10.96.4/converter/ppm/ilbmtoppm.c MALLOCARRAY_NOFAIL(ilbmrow, RowBytes(bmhdP->w)); *viewportmodesP |= fakeviewport; /* -isham/-isehb */ -Index: netpbm-10.96.4/converter/ppm/imgtoppm.c +Index: netpbm-11.2.0/converter/ppm/imgtoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/imgtoppm.c 2021-12-13 13:11:54.844622398 +0100 -+++ netpbm-10.96.4/converter/ppm/imgtoppm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/ppm/imgtoppm.c ++++ netpbm-11.2.0/converter/ppm/imgtoppm.c @@ -84,6 +84,7 @@ main(int argc, char ** argv) { len = atoi((char*) buf ); if ( fread( buf, len, 1, ifp ) != 1 ) @@ -570,10 +570,10 @@ Index: netpbm-10.96.4/converter/ppm/imgtoppm.c if ( len != cols * rows ) pm_message( "pixel data length (%d) does not match image size (%d)", -Index: netpbm-10.96.4/converter/ppm/Makefile +Index: netpbm-11.2.0/converter/ppm/Makefile =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/Makefile 2021-12-13 13:11:54.188618373 +0100 -+++ netpbm-10.96.4/converter/ppm/Makefile 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/ppm/Makefile ++++ netpbm-11.2.0/converter/ppm/Makefile @@ -11,7 +11,7 @@ SUBDIRS = hpcdtoppm ppmtompeg PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \ @@ -583,10 +583,10 @@ Index: netpbm-10.96.4/converter/ppm/Makefile ppmtoacad ppmtoapplevol ppmtoarbtxt ppmtoascii \ ppmtobmp ppmtoeyuv ppmtogif ppmtoicr ppmtoilbm \ ppmtoleaf ppmtolj ppmtomitsu ppmtoneo \ -Index: netpbm-10.96.4/converter/ppm/pcxtoppm.c +Index: netpbm-11.2.0/converter/ppm/pcxtoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/pcxtoppm.c 2021-12-13 13:11:54.856622471 +0100 -+++ netpbm-10.96.4/converter/ppm/pcxtoppm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/ppm/pcxtoppm.c ++++ netpbm-11.2.0/converter/ppm/pcxtoppm.c @@ -409,6 +409,7 @@ pcx_planes_to_pixels(pixels, bitplanes, /* * clear the pixel buffer @@ -603,20 +603,20 @@ Index: netpbm-10.96.4/converter/ppm/pcxtoppm.c rawcols = BytesPerLine * 8 / BitsPerPixel; if (headerCols > rawcols) { pm_message("warning - BytesPerLine = %d, " -Index: netpbm-10.96.4/converter/ppm/picttoppm.c +Index: netpbm-11.2.0/converter/ppm/picttoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/picttoppm.c 2021-12-13 13:11:51.740603358 +0100 -+++ netpbm-10.96.4/converter/ppm/picttoppm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/ppm/picttoppm.c ++++ netpbm-11.2.0/converter/ppm/picttoppm.c @@ -1,3 +1,5 @@ +#error "Unfixable. Don't ship me" + /* * picttoppm.c -- convert a MacIntosh PICT file to PPM format. * -Index: netpbm-10.96.4/converter/ppm/pjtoppm.c +Index: netpbm-11.2.0/converter/ppm/pjtoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/pjtoppm.c 2021-12-13 13:11:54.832622323 +0100 -+++ netpbm-10.96.4/converter/ppm/pjtoppm.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/ppm/pjtoppm.c ++++ netpbm-11.2.0/converter/ppm/pjtoppm.c @@ -168,14 +168,20 @@ main(int argc, const char ** argv) { case 'V': /* send plane */ case 'W': /* send last plane */ @@ -663,10 +663,10 @@ Index: netpbm-10.96.4/converter/ppm/pjtoppm.c cols *= 8; } -Index: netpbm-10.96.4/converter/ppm/ppmtoeyuv.c +Index: netpbm-11.2.0/converter/ppm/ppmtoeyuv.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtoeyuv.c 2021-12-13 13:11:54.868622544 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtoeyuv.c 2021-12-13 13:17:36.814714167 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtoeyuv.c ++++ netpbm-11.2.0/converter/ppm/ppmtoeyuv.c @@ -114,6 +114,7 @@ create_multiplication_tables(const pixva int index; @@ -675,11 +675,11 @@ Index: netpbm-10.96.4/converter/ppm/ppmtoeyuv.c MALLOCARRAY_NOFAIL(mult299 , maxval+1); MALLOCARRAY_NOFAIL(mult587 , maxval+1); MALLOCARRAY_NOFAIL(mult114 , maxval+1); -Index: netpbm-10.96.4/converter/ppm/ppmtoilbm.c +Index: netpbm-11.2.0/converter/ppm/ppmtoilbm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtoilbm.c 2021-12-13 13:11:54.084617737 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtoilbm.c 2021-12-13 13:17:36.818714191 +0100 -@@ -190,6 +190,7 @@ makeValTable(int const oldmaxval, +--- netpbm-11.2.0.orig/converter/ppm/ppmtoilbm.c ++++ netpbm-11.2.0/converter/ppm/ppmtoilbm.c +@@ -188,6 +188,7 @@ makeValTable(int const oldmaxval, unsigned int i; int * table; @@ -687,7 +687,7 @@ Index: netpbm-10.96.4/converter/ppm/ppmtoilbm.c MALLOCARRAY_NOFAIL(table, oldmaxval + 1); for (i = 0; i <= oldmaxval; ++i) table[i] = ROUNDDIV(i * newmaxval, oldmaxval); -@@ -1644,6 +1645,7 @@ ppmToRgb8(FILE * const ifP, +@@ -1625,6 +1626,7 @@ ppmToRgb8(FILE * const ifP, maskmethod = 0; /* no masking - RGB8 uses genlock bits */ compmethod = 4; /* RGB8 files are always compressed */ @@ -695,7 +695,7 @@ Index: netpbm-10.96.4/converter/ppm/ppmtoilbm.c MALLOCARRAY_NOFAIL(compr_row, cols * 4); if( maxval != 255 ) { -@@ -1735,6 +1737,7 @@ ppmToRgbn(FILE * const ifP, +@@ -1716,6 +1718,7 @@ ppmToRgbn(FILE * const ifP, maskmethod = 0; /* no masking - RGBN uses genlock bits */ compmethod = 4; /* RGBN files are always compressed */ @@ -703,7 +703,7 @@ Index: netpbm-10.96.4/converter/ppm/ppmtoilbm.c MALLOCARRAY_NOFAIL(compr_row, cols * 2); if( maxval != 15 ) { -@@ -2298,8 +2301,10 @@ main(int argc, char ** argv) { +@@ -2277,8 +2280,10 @@ main(int argc, char ** argv) { MALLOCARRAY_NOFAIL(coded_rowbuf, RowBytes(cols)); for (i = 0; i < RowBytes(cols); ++i) coded_rowbuf[i] = 0; @@ -713,12 +713,12 @@ Index: netpbm-10.96.4/converter/ppm/ppmtoilbm.c pm_rlenc_allocoutbuf(&compr_rowbuf, RowBytes(cols), PM_RLE_PACKBITS); + } } - + switch (mode) { -Index: netpbm-10.96.4/converter/ppm/ppmtolj.c +Index: netpbm-11.2.0/converter/ppm/ppmtolj.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtolj.c 2021-12-13 13:11:54.844622398 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtolj.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtolj.c ++++ netpbm-11.2.0/converter/ppm/ppmtolj.c @@ -182,6 +182,7 @@ int main(int argc, char *argv[]) { ppm_readppminit( ifp, &cols, &rows, &maxval, &format ); pixelrow = ppm_allocrow( cols ); @@ -727,10 +727,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtolj.c obuf = (unsigned char *) pm_allocrow(cols * 3, sizeof(unsigned char)); cbuf = (unsigned char *) pm_allocrow(cols * 6, sizeof(unsigned char)); if (mode == C_TRANS_MODE_DELTA) -Index: netpbm-10.96.4/converter/ppm/ppmtomitsu.c +Index: netpbm-11.2.0/converter/ppm/ppmtomitsu.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtomitsu.c 2021-12-13 13:11:54.844622398 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtomitsu.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtomitsu.c ++++ netpbm-11.2.0/converter/ppm/ppmtomitsu.c @@ -685,6 +685,8 @@ main(int argc, char * argv[]) { medias = MSize_User; @@ -740,10 +740,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtomitsu.c medias.maxcols *= 2; medias.maxrows *= 2; } -Index: netpbm-10.96.4/converter/ppm/ppmtopcx.c +Index: netpbm-11.2.0/converter/ppm/ppmtopcx.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtopcx.c 2021-12-13 13:11:51.720603235 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtopcx.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtopcx.c ++++ netpbm-11.2.0/converter/ppm/ppmtopcx.c @@ -410,6 +410,9 @@ writeRaster16Color(FILE * const ofP, unsigned int row; @@ -754,10 +754,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtopcx.c MALLOCARRAY_NOFAIL(indexRow, cols); MALLOCARRAY(planesrow, bytesPerLine); -Index: netpbm-10.96.4/converter/ppm/ppmtopict.c +Index: netpbm-11.2.0/converter/ppm/ppmtopict.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtopict.c 2021-12-13 13:11:54.836622349 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtopict.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtopict.c ++++ netpbm-11.2.0/converter/ppm/ppmtopict.c @@ -450,6 +450,8 @@ main(int argc, const char ** argv) { putShort(stdout, 0); /* mode */ @@ -767,10 +767,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtopict.c outBuf = malloc((unsigned)(cols+cols/MAX_COUNT+1)); for (row = 0, oc = 0; row < rows; ++row) { unsigned int rowSize; -Index: netpbm-10.96.4/converter/ppm/ppmtopj.c +Index: netpbm-11.2.0/converter/ppm/ppmtopj.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtopj.c 2021-12-13 13:11:54.860622495 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtopj.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtopj.c ++++ netpbm-11.2.0/converter/ppm/ppmtopj.c @@ -179,6 +179,7 @@ char *argv[]; pixels = ppm_readppm( ifp, &cols, &rows, &maxval ); @@ -779,10 +779,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtopj.c obuf = (unsigned char *) pm_allocrow(cols, sizeof(unsigned char)); cbuf = (unsigned char *) pm_allocrow(cols * 2, sizeof(unsigned char)); -Index: netpbm-10.96.4/converter/ppm/ppmtopjxl.c +Index: netpbm-11.2.0/converter/ppm/ppmtopjxl.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtopjxl.c 2021-12-13 13:11:54.836622349 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtopjxl.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtopjxl.c ++++ netpbm-11.2.0/converter/ppm/ppmtopjxl.c @@ -266,6 +266,8 @@ main(int argc, const char * argv[]) { pm_error("image too large; reduce with ppmscale"); if (maxval > PCL_MAXVAL) @@ -815,10 +815,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtopjxl.c inrow = (char *)malloc((unsigned)bpp); outrow = (char *)malloc((unsigned)bpp*2); runcnt = (signed char *)malloc((unsigned)bpp); -Index: netpbm-10.96.4/converter/ppm/ppmtowinicon.c +Index: netpbm-11.2.0/converter/ppm/ppmtowinicon.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtowinicon.c 2021-12-13 13:11:54.836622349 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtowinicon.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtowinicon.c ++++ netpbm-11.2.0/converter/ppm/ppmtowinicon.c @@ -12,6 +12,7 @@ #include @@ -862,10 +862,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtowinicon.c entry->size_in_bytes = xorBitmap->size + andBitmap->size + 40 + (4 * entry->color_count); if (verbose) -Index: netpbm-10.96.4/converter/ppm/ppmtoxpm.c +Index: netpbm-11.2.0/converter/ppm/ppmtoxpm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ppmtoxpm.c 2021-12-13 13:11:54.836622349 +0100 -+++ netpbm-10.96.4/converter/ppm/ppmtoxpm.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ppmtoxpm.c ++++ netpbm-11.2.0/converter/ppm/ppmtoxpm.c @@ -198,6 +198,7 @@ genNumstr(unsigned int const input, int unsigned int i; @@ -882,10 +882,10 @@ Index: netpbm-10.96.4/converter/ppm/ppmtoxpm.c MALLOCARRAY(cmap, cmapSize); if (cmapP == NULL) pm_error("Out of memory allocating %u bytes for a color map.", -Index: netpbm-10.96.4/converter/ppm/qrttoppm.c +Index: netpbm-11.2.0/converter/ppm/qrttoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/qrttoppm.c 2021-12-13 13:11:54.840622372 +0100 -+++ netpbm-10.96.4/converter/ppm/qrttoppm.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/qrttoppm.c ++++ netpbm-11.2.0/converter/ppm/qrttoppm.c @@ -46,7 +46,7 @@ main( argc, argv ) ppm_writeppminit( stdout, cols, rows, maxval, 0 ); @@ -895,10 +895,10 @@ Index: netpbm-10.96.4/converter/ppm/qrttoppm.c if ( buf == (unsigned char *) 0 ) pm_error( "out of memory" ); -Index: netpbm-10.96.4/converter/ppm/sldtoppm.c +Index: netpbm-11.2.0/converter/ppm/sldtoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/sldtoppm.c 2021-12-13 13:11:54.084617737 +0100 -+++ netpbm-10.96.4/converter/ppm/sldtoppm.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/sldtoppm.c ++++ netpbm-11.2.0/converter/ppm/sldtoppm.c @@ -506,6 +506,8 @@ slider(slvecfn slvec, /* Allocate image buffer and clear it to black. */ @@ -908,10 +908,10 @@ Index: netpbm-10.96.4/converter/ppm/sldtoppm.c pixels = ppm_allocarray(pixcols = ixdots + 1, pixrows = iydots + 1); PPM_ASSIGN(rgbcolor, 0, 0, 0); ppmd_filledrectangle(pixels, pixcols, pixrows, pixmaxval, 0, 0, -Index: netpbm-10.96.4/converter/ppm/ximtoppm.c +Index: netpbm-11.2.0/converter/ppm/ximtoppm.c =================================================================== ---- netpbm-10.96.4.orig/converter/ppm/ximtoppm.c 2021-12-13 13:11:51.712603186 +0100 -+++ netpbm-10.96.4/converter/ppm/ximtoppm.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/converter/ppm/ximtoppm.c ++++ netpbm-11.2.0/converter/ppm/ximtoppm.c @@ -147,6 +147,7 @@ ReadXimHeader(FILE * const in_fp, if (header->nchannels == 3 && header->bits_channel == 8) header->ncolors = 0; @@ -920,10 +920,10 @@ Index: netpbm-10.96.4/converter/ppm/ximtoppm.c header->colors = (Color *)calloc((unsigned int)header->ncolors, sizeof(Color)); if (header->colors == NULL) { -Index: netpbm-10.96.4/editor/pamcut.c +Index: netpbm-11.2.0/editor/pamcut.c =================================================================== ---- netpbm-10.96.4.orig/editor/pamcut.c 2021-12-13 13:11:54.872622569 +0100 -+++ netpbm-10.96.4/editor/pamcut.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pamcut.c ++++ netpbm-11.2.0/editor/pamcut.c @@ -799,6 +799,8 @@ cutOneImage(FILE * const ifP outpam = inpam; /* Initial value -- most fields should be same */ @@ -933,10 +933,10 @@ Index: netpbm-10.96.4/editor/pamcut.c outpam.width = rightcol - leftcol + 1; outpam.height = bottomrow - toprow + 1; -Index: netpbm-10.96.4/editor/pbmreduce.c +Index: netpbm-11.2.0/editor/pbmreduce.c =================================================================== ---- netpbm-10.96.4.orig/editor/pbmreduce.c 2021-12-13 13:11:55.072623795 +0100 -+++ netpbm-10.96.4/editor/pbmreduce.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pbmreduce.c ++++ netpbm-11.2.0/editor/pbmreduce.c @@ -153,6 +153,7 @@ initializeFloydSteinberg(struct FS * co unsigned int col; struct pm_randSt randSt; @@ -945,10 +945,10 @@ Index: netpbm-10.96.4/editor/pbmreduce.c MALLOCARRAY(fsP->thiserr, newcols + 2); MALLOCARRAY(fsP->nexterr, newcols + 2); -Index: netpbm-10.96.4/editor/pnmgamma.c +Index: netpbm-11.2.0/editor/pnmgamma.c =================================================================== ---- netpbm-10.96.4.orig/editor/pnmgamma.c 2021-12-13 13:11:56.088630025 +0100 -+++ netpbm-10.96.4/editor/pnmgamma.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pnmgamma.c ++++ netpbm-11.2.0/editor/pnmgamma.c @@ -596,6 +596,7 @@ createGammaTables(enum transferFunction xelval ** const btableP) { @@ -957,10 +957,10 @@ Index: netpbm-10.96.4/editor/pnmgamma.c MALLOCARRAY(*rtableP, maxval+1); MALLOCARRAY(*gtableP, maxval+1); MALLOCARRAY(*btableP, maxval+1); -Index: netpbm-10.96.4/editor/pnmhisteq.c +Index: netpbm-11.2.0/editor/pnmhisteq.c =================================================================== ---- netpbm-10.96.4.orig/editor/pnmhisteq.c 2021-12-13 13:11:56.096630074 +0100 -+++ netpbm-10.96.4/editor/pnmhisteq.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pnmhisteq.c ++++ netpbm-11.2.0/editor/pnmhisteq.c @@ -107,6 +107,7 @@ computeLuminosityHistogram(xel * const * unsigned int pixelCount; unsigned int * lumahist; @@ -969,23 +969,10 @@ Index: netpbm-10.96.4/editor/pnmhisteq.c MALLOCARRAY(lumahist, maxval + 1); if (lumahist == NULL) pm_error("Out of storage allocating array for %u histogram elements", -Index: netpbm-10.96.4/editor/pnmindex.csh +Index: netpbm-11.2.0/editor/pnmpad.c =================================================================== ---- netpbm-10.96.4.orig/editor/pnmindex.csh 2021-12-13 13:17:36.802714093 +0100 -+++ netpbm-10.96.4/editor/pnmindex.csh 2021-12-13 13:17:36.818714191 +0100 -@@ -1,5 +1,8 @@ - #!/bin/csh -f - # -+echo "Unsafe code, needs debugging, do not ship" -+exit 1 -+# - # pnmindex - build a visual index of a bunch of anymaps - # - # Copyright (C) 1991 by Jef Poskanzer. -Index: netpbm-10.96.4/editor/pnmpad.c -=================================================================== ---- netpbm-10.96.4.orig/editor/pnmpad.c 2021-12-13 13:11:55.072623795 +0100 -+++ netpbm-10.96.4/editor/pnmpad.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pnmpad.c ++++ netpbm-11.2.0/editor/pnmpad.c @@ -654,6 +654,8 @@ main(int argc, const char ** argv) { computePadSizes(cmdline, cols, rows, &lpad, &rpad, &tpad, &bpad); @@ -995,10 +982,10 @@ Index: netpbm-10.96.4/editor/pnmpad.c newcols = cols + lpad + rpad; if (cmdline.reportonly) -Index: netpbm-10.96.4/editor/pnmremap.c +Index: netpbm-11.2.0/editor/pnmremap.c =================================================================== ---- netpbm-10.96.4.orig/editor/pnmremap.c 2021-12-13 13:11:55.076623820 +0100 -+++ netpbm-10.96.4/editor/pnmremap.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pnmremap.c ++++ netpbm-11.2.0/editor/pnmremap.c @@ -469,7 +469,7 @@ fserr_init(struct pam * const pamP, unsigned int plane; @@ -1016,10 +1003,10 @@ Index: netpbm-10.96.4/editor/pnmremap.c for (col = 0; col < pamP->width + 2; ++col) { unsigned int plane; for (plane = 0; plane < pamP->depth; ++plane) -Index: netpbm-10.96.4/editor/pnmscalefixed.c +Index: netpbm-11.2.0/editor/pnmscalefixed.c =================================================================== ---- netpbm-10.96.4.orig/editor/pnmscalefixed.c 2021-12-13 13:11:56.108630148 +0100 -+++ netpbm-10.96.4/editor/pnmscalefixed.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pnmscalefixed.c ++++ netpbm-11.2.0/editor/pnmscalefixed.c @@ -214,6 +214,8 @@ compute_output_dimensions(const struct c const int rows, const int cols, int * newrowsP, int * newcolsP) { @@ -1048,10 +1035,10 @@ Index: netpbm-10.96.4/editor/pnmscalefixed.c sxscale = SCALE * newcols / cols; syscale = SCALE * newrows / rows; -Index: netpbm-10.96.4/editor/pnmshear.c +Index: netpbm-11.2.0/editor/pnmshear.c =================================================================== ---- netpbm-10.96.4.orig/editor/pnmshear.c 2021-12-13 13:11:56.088630025 +0100 -+++ netpbm-10.96.4/editor/pnmshear.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/pnmshear.c ++++ netpbm-11.2.0/editor/pnmshear.c @@ -15,6 +15,7 @@ #include #include @@ -1072,10 +1059,10 @@ Index: netpbm-10.96.4/editor/pnmshear.c newcolsD = (double) rows * fabs(shearfac) + cols + 0.999999; if (newcolsD > INT_MAX-2) pm_error("angle is too close to +/-90 degrees; " -Index: netpbm-10.96.4/editor/ppmdither.c +Index: netpbm-11.2.0/editor/ppmdither.c =================================================================== ---- netpbm-10.96.4.orig/editor/ppmdither.c 2021-12-13 13:11:56.484632454 +0100 -+++ netpbm-10.96.4/editor/ppmdither.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/ppmdither.c ++++ netpbm-11.2.0/editor/ppmdither.c @@ -355,7 +355,11 @@ dithMatrix(unsigned int const dithPower) unsigned int const dithMatSize = (dithDim * sizeof(*dithMat)) + /* pointers */ @@ -1089,10 +1076,10 @@ Index: netpbm-10.96.4/editor/ppmdither.c dithMat = malloc(dithMatSize); if (dithMat == NULL) -Index: netpbm-10.96.4/editor/specialty/pamoil.c +Index: netpbm-11.2.0/editor/specialty/pamoil.c =================================================================== ---- netpbm-10.96.4.orig/editor/specialty/pamoil.c 2021-12-13 13:11:56.084630000 +0100 -+++ netpbm-10.96.4/editor/specialty/pamoil.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/editor/specialty/pamoil.c ++++ netpbm-11.2.0/editor/specialty/pamoil.c @@ -112,6 +112,7 @@ main(int argc, char *argv[] ) { tuples = pnm_readpam(ifp, &inpam, PAM_STRUCT_SIZE(tuple_type)); pm_close(ifp); @@ -1101,10 +1088,10 @@ Index: netpbm-10.96.4/editor/specialty/pamoil.c MALLOCARRAY(hist, inpam.maxval + 1); if (hist == NULL) pm_error("Unable to allocate memory for histogram."); -Index: netpbm-10.96.4/generator/pbmtext.c +Index: netpbm-11.2.0/generator/pbmtext.c =================================================================== ---- netpbm-10.96.4.orig/generator/pbmtext.c 2021-12-13 13:11:57.516638781 +0100 -+++ netpbm-10.96.4/generator/pbmtext.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/generator/pbmtext.c ++++ netpbm-11.2.0/generator/pbmtext.c @@ -1144,6 +1144,7 @@ getText(PM_WCHAR const cmdli "Cannot process", lineCount, (unsigned int) MAXLINECHARS); @@ -1121,10 +1108,10 @@ Index: netpbm-10.96.4/generator/pbmtext.c *hmarginP = 2 * fontP->maxwidth; } } -Index: netpbm-10.96.4/generator/pgmkernel.c +Index: netpbm-11.2.0/generator/pgmkernel.c =================================================================== ---- netpbm-10.96.4.orig/generator/pgmkernel.c 2021-12-13 13:11:57.824640671 +0100 -+++ netpbm-10.96.4/generator/pgmkernel.c 2021-12-13 13:17:36.818714191 +0100 +--- netpbm-11.2.0.orig/generator/pgmkernel.c ++++ netpbm-11.2.0/generator/pgmkernel.c @@ -214,6 +214,7 @@ main(int argc, const char * argv[]) { /* Output matrix is symmetric vertically and horizontally. */ @@ -1133,10 +1120,10 @@ Index: netpbm-10.96.4/generator/pgmkernel.c arows = (cmdline.rows + 1) / 2; /* Half the number of rows. Add 1 if odd. */ halfKernel = pgm_allocarray(cmdline.cols, arows); -Index: netpbm-10.96.4/lib/libpammap.c +Index: netpbm-11.2.0/lib/libpammap.c =================================================================== ---- netpbm-10.96.4.orig/lib/libpammap.c 2021-12-13 13:11:56.500632552 +0100 -+++ netpbm-10.96.4/lib/libpammap.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/lib/libpammap.c ++++ netpbm-11.2.0/lib/libpammap.c @@ -108,6 +108,8 @@ allocTupleIntListItem(struct pam * const */ struct tupleint_list_item * retval; @@ -1146,10 +1133,10 @@ Index: netpbm-10.96.4/lib/libpammap.c unsigned int const size = sizeof(*retval) - sizeof(retval->tupleint.tuple) + pamP->depth * sizeof(sample); -Index: netpbm-10.96.4/lib/libpbm1.c +Index: netpbm-11.2.0/lib/libpbm1.c =================================================================== ---- netpbm-10.96.4.orig/lib/libpbm1.c 2021-12-13 13:11:57.504638709 +0100 -+++ netpbm-10.96.4/lib/libpbm1.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/lib/libpbm1.c ++++ netpbm-11.2.0/lib/libpbm1.c @@ -79,6 +79,7 @@ pbm_check(FILE * const fil } else { pm_filepos const bytesPerRow = (cols+7)/8; @@ -1158,11 +1145,11 @@ Index: netpbm-10.96.4/lib/libpbm1.c pm_check(fileP, checkType, needRasterSize, retvalP); } } -Index: netpbm-10.96.4/lib/libpm.c +Index: netpbm-11.2.0/lib/libpm.c =================================================================== ---- netpbm-10.96.4.orig/lib/libpm.c 2021-12-13 13:11:56.496632527 +0100 -+++ netpbm-10.96.4/lib/libpm.c 2021-12-13 13:17:36.822714216 +0100 -@@ -889,4 +889,53 @@ pm_parse_height(const char * const arg) +--- netpbm-11.2.0.orig/lib/libpm.c ++++ netpbm-11.2.0/lib/libpm.c +@@ -892,4 +892,53 @@ pm_parse_height(const char * const arg) } @@ -1216,11 +1203,11 @@ Index: netpbm-10.96.4/lib/libpm.c + return realloc(a, b*c); +} -Index: netpbm-10.96.4/lib/pm.h +Index: netpbm-11.2.0/lib/pm.h =================================================================== ---- netpbm-10.96.4.orig/lib/pm.h 2021-12-13 13:11:56.508632602 +0100 -+++ netpbm-10.96.4/lib/pm.h 2021-12-13 13:17:36.822714216 +0100 -@@ -442,4 +442,11 @@ pm_parse_height(const char * const arg); +--- netpbm-11.2.0.orig/lib/pm.h ++++ netpbm-11.2.0/lib/pm.h +@@ -455,4 +455,11 @@ pm_parse_height(const char * const arg); #endif @@ -1232,11 +1219,11 @@ Index: netpbm-10.96.4/lib/pm.h +void overflow_add(int, int); + #endif -Index: netpbm-10.96.4/other/pnmcolormap.c +Index: netpbm-11.2.0/other/pnmcolormap.c =================================================================== ---- netpbm-10.96.4.orig/other/pnmcolormap.c 2021-12-13 13:12:01.568663631 +0100 -+++ netpbm-10.96.4/other/pnmcolormap.c 2021-12-13 13:17:36.822714216 +0100 -@@ -1002,6 +1002,7 @@ colormapToSquare(struct pam * const pamP +--- netpbm-11.2.0.orig/other/pnmcolormap.c ++++ netpbm-11.2.0/other/pnmcolormap.c +@@ -1069,6 +1069,7 @@ colormapToSquare(struct pam * const pamP pamP->width = intsqrt; else pamP->width = intsqrt + 1; @@ -1244,23 +1231,10 @@ Index: netpbm-10.96.4/other/pnmcolormap.c } { unsigned int const intQuotient = colormap.size / pamP->width; -Index: netpbm-10.96.4/urt/README +Index: netpbm-11.2.0/urt/rle_addhist.c =================================================================== ---- netpbm-10.96.4.orig/urt/README 2021-12-13 13:12:01.848665347 +0100 -+++ netpbm-10.96.4/urt/README 2021-12-13 13:17:36.822714216 +0100 -@@ -18,3 +18,8 @@ in its initializer in the original. But - defines stdout as a variable, so that wouldn't compile. So I changed - it to NULL and added a line to rle_hdr_init to set that field to - 'stdout' dynamically. 2000.06.02 BJH. -+ -+Redid the code to check for maths overflows and other crawly horrors. -+Removed pipe through and compress support (unsafe) -+ -+Alan Cox -Index: netpbm-10.96.4/urt/rle_addhist.c -=================================================================== ---- netpbm-10.96.4.orig/urt/rle_addhist.c 2021-12-13 13:12:01.848665347 +0100 -+++ netpbm-10.96.4/urt/rle_addhist.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/urt/rle_addhist.c ++++ netpbm-11.2.0/urt/rle_addhist.c @@ -14,6 +14,8 @@ * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, @@ -1268,11 +1242,11 @@ Index: netpbm-10.96.4/urt/rle_addhist.c + * + * 2002-12-19: Fix maths wrapping bugs. Alan Cox */ - /* + /* * rle_addhist.c - Add to the HISTORY comment in header @@ -70,13 +72,19 @@ rle_addhist(char * argv[], return; - + length = 0; - for (i = 0; argv[i]; ++i) + for (i = 0; argv[i]; ++i) { @@ -1294,7 +1268,7 @@ Index: netpbm-10.96.4/urt/rle_addhist.c @@ -84,9 +92,12 @@ rle_addhist(char * argv[], else old = NULL; - + - if (old && *old) + if (old && *old) { + overflow_add(length, strlen(old)); @@ -1305,10 +1279,10 @@ Index: netpbm-10.96.4/urt/rle_addhist.c ++length; /*Cater for the null. */ MALLOCARRAY(newc, length); -Index: netpbm-10.96.4/urt/rle_getrow.c +Index: netpbm-11.2.0/urt/rle_getrow.c =================================================================== ---- netpbm-10.96.4.orig/urt/rle_getrow.c 2021-12-13 13:12:01.556663557 +0100 -+++ netpbm-10.96.4/urt/rle_getrow.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/urt/rle_getrow.c ++++ netpbm-11.2.0/urt/rle_getrow.c @@ -17,6 +17,8 @@ * * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire @@ -1316,7 +1290,7 @@ Index: netpbm-10.96.4/urt/rle_getrow.c + * + * 2002-12-19: Fix maths wrapping bugs. Alan Cox */ - /* + /* * rle_getrow.c - Read an RLE file in. @@ -164,6 +166,7 @@ rle_get_setup(rle_hdr * const the_hdr) { char * cp; @@ -1326,10 +1300,10 @@ Index: netpbm-10.96.4/urt/rle_getrow.c evenlen = (comlen + 1) & ~1; /* make it even */ if (evenlen) { MALLOCARRAY(comment_buf, evenlen); -Index: netpbm-10.96.4/urt/rle_hdr.c +Index: netpbm-11.2.0/urt/rle_hdr.c =================================================================== ---- netpbm-10.96.4.orig/urt/rle_hdr.c 2021-12-13 13:12:01.848665347 +0100 -+++ netpbm-10.96.4/urt/rle_hdr.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/urt/rle_hdr.c ++++ netpbm-11.2.0/urt/rle_hdr.c @@ -14,6 +14,8 @@ * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, @@ -1365,10 +1339,10 @@ Index: netpbm-10.96.4/urt/rle_hdr.c size *= sizeof(char *); toHdrP->comments = malloc(size); if (!toHdrP->comments) -Index: netpbm-10.96.4/urt/rle.h +Index: netpbm-11.2.0/urt/rle.h =================================================================== ---- netpbm-10.96.4.orig/urt/rle.h 2021-12-13 13:12:01.856665397 +0100 -+++ netpbm-10.96.4/urt/rle.h 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/urt/rle.h ++++ netpbm-11.2.0/urt/rle.h @@ -14,6 +14,9 @@ * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, @@ -1397,10 +1371,10 @@ Index: netpbm-10.96.4/urt/rle.h /* Declare RLE library routines. */ -Index: netpbm-10.96.4/urt/rle_open_f.c +Index: netpbm-11.2.0/urt/rle_open_f.c =================================================================== ---- netpbm-10.96.4.orig/urt/rle_open_f.c 2021-12-13 13:12:01.388662528 +0100 -+++ netpbm-10.96.4/urt/rle_open_f.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/urt/rle_open_f.c ++++ netpbm-11.2.0/urt/rle_open_f.c @@ -163,65 +163,7 @@ dealWithSubprocess(const char * const f FILE ** const fpP, bool * const noSubprocessP, @@ -1467,10 +1441,10 @@ Index: netpbm-10.96.4/urt/rle_open_f.c } -Index: netpbm-10.96.4/urt/rle_putcom.c +Index: netpbm-11.2.0/urt/rle_putcom.c =================================================================== ---- netpbm-10.96.4.orig/urt/rle_putcom.c 2021-12-13 13:12:01.852665372 +0100 -+++ netpbm-10.96.4/urt/rle_putcom.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/urt/rle_putcom.c ++++ netpbm-11.2.0/urt/rle_putcom.c @@ -14,6 +14,8 @@ * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, @@ -1478,7 +1452,7 @@ Index: netpbm-10.96.4/urt/rle_putcom.c + * + * 2002-12-19: Fix maths wrapping bugs. Alan Cox */ - /* + /* * rle_putcom.c - Add a picture comment to the header struct. @@ -98,12 +100,14 @@ rle_putcom(const char * const value, const char * v; @@ -1496,10 +1470,10 @@ Index: netpbm-10.96.4/urt/rle_putcom.c /* Not found */ /* Can't realloc because somebody else might be pointing to this * comments block. Of course, if this were true, then the -Index: netpbm-10.96.4/urt/Runput.c +Index: netpbm-11.2.0/urt/Runput.c =================================================================== ---- netpbm-10.96.4.orig/urt/Runput.c 2021-12-13 13:12:01.852665372 +0100 -+++ netpbm-10.96.4/urt/Runput.c 2021-12-13 13:17:36.822714216 +0100 +--- netpbm-11.2.0.orig/urt/Runput.c ++++ netpbm-11.2.0/urt/Runput.c @@ -17,6 +17,8 @@ * * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire @@ -1507,60 +1481,37 @@ Index: netpbm-10.96.4/urt/Runput.c + * + * 2002-12-19: Fix maths wrapping bugs. Alan Cox */ - /* + /* * Runput.c - General purpose Run Length Encoding. -@@ -202,9 +204,11 @@ RunSetup(rle_hdr * the_hdr) +@@ -202,9 +204,12 @@ RunSetup(rle_hdr * the_hdr) if ( the_hdr->background != 0 ) { - register int i; -- register rle_pixel *background = -- (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); -+ register rle_pixel *background; - register int *bg_color; + int i; +- rle_pixel *background = +- (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); ++ register rle_pixel *background; + int *bg_color; + -+ overflow_add(the_hdr->ncolors,1); ++ overflow_add(the_hdr->ncolors,1); + background = (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); - /* - * If even number of bg color bytes, put out one more to get to - * 16 bit boundary. -@@ -224,7 +228,7 @@ RunSetup(rle_hdr * the_hdr) - /* Big-endian machines are harder */ - register int i, nmap = (1 << the_hdr->cmaplen) * - the_hdr->ncmap; -- register char *h_cmap = (char *)malloc( nmap * 2 ); -+ register char *h_cmap = (char *)malloc2( nmap, 2 ); - if ( h_cmap == NULL ) - { - fprintf( stderr, -Index: netpbm-10.96.4/urt/scanargs.c ++ + /* + * If even number of bg color bytes, put out one more to get to + * 16 bit boundary. +@@ -224,7 +229,7 @@ RunSetup(rle_hdr * the_hdr) + /* Big-endian machines are harder */ + int i, nmap = (1 << the_hdr->cmaplen) * + the_hdr->ncmap; +- char *h_cmap = (char *)malloc( nmap * 2 ); ++ char *h_cmap = (char *)malloc2( nmap, 2 ); + if ( h_cmap == NULL ) + { + fprintf( stderr, +Index: netpbm-11.2.0/lib/libpam.c =================================================================== ---- netpbm-10.96.4.orig/urt/scanargs.c 2021-12-13 13:12:01.852665372 +0100 -+++ netpbm-10.96.4/urt/scanargs.c 2021-12-13 13:17:36.822714216 +0100 -@@ -38,6 +38,8 @@ - * - * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire - * to have all "void" functions so declared. -+ * -+ * 2002-12-19: Fix maths wrapping bugs. Alan Cox - */ - - #include -@@ -62,8 +64,8 @@ typedef int *ptr; - /* - * Storage allocation macros - */ --#define NEW( type, cnt ) (type *) malloc( (cnt) * sizeof( type ) ) --#define RENEW( type, ptr, cnt ) (type *) realloc( ptr, (cnt) * sizeof( type ) ) -+#define NEW( type, cnt ) (type *) malloc2( (cnt) , sizeof( type ) ) -+#define RENEW( type, ptr, cnt ) (type *) realloc2( ptr, (cnt), sizeof( type ) ) - - static CONST_DECL char * prformat( CONST_DECL char *, int ); - static int isnum( CONST_DECL char *, int, int ); -Index: netpbm-10.96.4/lib/libpam.c -=================================================================== ---- netpbm-10.96.4.orig/lib/libpam.c 2021-12-13 13:11:56.116630197 +0100 -+++ netpbm-10.96.4/lib/libpam.c 2021-12-13 13:17:36.822714216 +0100 -@@ -225,7 +225,8 @@ allocPamRow(const struct pam * const pam +--- netpbm-11.2.0.orig/lib/libpam.c ++++ netpbm-11.2.0/lib/libpam.c +@@ -248,7 +248,8 @@ allocPamRow(const struct pam * const pam unsigned int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample); tuple * tuplerow; diff --git a/netpbm-security-scripts.patch b/netpbm-security-scripts.patch index ada860a..1059d6c 100644 --- a/netpbm-security-scripts.patch +++ b/netpbm-security-scripts.patch @@ -1,274 +1,7 @@ -Index: netpbm-10.93.0/editor/ppmfade +Index: netpbm-11.2.0/editor/ppmshadow =================================================================== ---- netpbm-10.93.0.orig/editor/ppmfade 2020-12-29 11:04:15.768844529 +0100 -+++ netpbm-10.93.0/editor/ppmfade 2020-12-29 11:06:05.909522666 +0100 -@@ -40,6 +40,7 @@ exec perl -w -x -S -- "$0" "$@" - # - ############################################################################## - use strict; -+use File::Temp "tempdir"; - - sub doVersionHack($) { - my ($argvR) = @_; -@@ -149,20 +150,26 @@ if ($first_file ne "undefined") { - - print("Frames are " . $width . "W x " . $height . "H\n"); - -+# -+# We create a tmp-directory right here -+# -+my $tmpdir = tempdir("ppmfade.XXXXXX", CLEANUP => 1); -+ -+ - if ($first_file eq "undefined") { - print "Fading from black to "; -- system("ppmmake \\#000 $width $height >junk1$$.ppm"); -+ system("ppmmake \\#000 $width $height >$tmpdir/junk1$$.ppm"); - } else { - print "Fading from $first_file to "; -- system("cp", $first_file, "junk1$$.ppm"); -+ system("cp", $first_file, "$tmpdir/junk1$$.ppm"); - } - - if ($last_file eq "undefined") { - print "black.\n"; -- system("ppmmake \\#000 $width $height >junk2$$.ppm"); -+ system("ppmmake \\#000 $width $height >$tmpdir/junk2$$.ppm"); - } else { - print "$last_file\n"; -- system("cp", $last_file, "junk2$$.ppm"); -+ system("cp", $last_file, "$tmpdir/junk2$$.ppm"); - } - - # -@@ -170,14 +177,14 @@ if ($last_file eq "undefined") { - # - - # Here's what our temporary files are: --# junk1$$.ppm: The original (fade-from) image --# junk2$$.ppm: The target (fade-from) image --# junk3$$.ppm: The frame of the fade for the current iteration of the --# the for loop. --# junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate --# image to another, this is the first frame of that --# sequence. --# junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence -+# $tmpdir/junk1$$.ppm: The original (fade-from) image -+# $tmpdir/junk2$$.ppm: The target (fade-from) image -+# $tmpdir/junk3$$.ppm: The frame of the fade for the current iteration of the -+# the for loop. -+# $tmpdir/junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate -+# image to another, this is the first frame of that -+# sequence. -+# $tmpdir/junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence - - my $i; # Frame number - for ($i = 1; $i <= $nframes; $i++) { -@@ -185,147 +192,147 @@ for ($i = 1; $i <= $nframes; $i++) { - if ($mode eq $SPREAD) { - if ($i <= 10) { - my $n = $spline20[$i] * 100; -- system("ppmspread $n junk1$$.ppm >junk3$$.ppm"); -+ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n; - $n = $spline20[$i] * 100; -- system("ppmspread $n junk1$$.ppm >junk1a$$.ppm"); -+ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm"); - $n = (1-$spline20[$i-10]) * 100; -- system("ppmspread $n junk2$$.ppm >junk2a$$.ppm"); -+ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm"); - $n = $spline10[$i-10]; -- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = (1-$spline20[$i-10])*100; -- system("ppmspread $n junk2$$.ppm >junk3$$.ppm"); -+ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - } elsif ($mode eq $SHIFT) { - if ($i <= 10) { - my $n = $spline20[$i] * 100; -- system("ppmshift $n junk1$$.ppm >junk3$$.ppm"); -+ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n; - $n = $spline20[$i] * 100; -- system("ppmshift $n junk1$$.ppm >junk1a$$.ppm"); -+ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm"); - $n = (1-$spline20[$i-10])*100; -- system("ppmshift $n junk2$$.ppm >junk2a$$.ppm"); -+ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm"); - $n = $spline10[$i-10]; -- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = (1-$spline20[$i-10]) * 100; -- system("ppmshift $n junk2$$.ppm >junk3$$.ppm"); -+ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - } elsif ($mode eq $RELIEF) { - if ($i == 1) { -- system("ppmrelief junk1$$.ppm >junk1r$$.ppm"); -+ system("ppmrelief $tmpdir/junk1$$.ppm >$tmpdir/junk1r$$.ppm"); - } - if ($i <= 10) { - my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1r$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1r$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n = $spline10[$i-10]; -- system("ppmmix $n junk1r$$.ppm junk2r$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1r$$.ppm $tmpdir/junk2r$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = $spline10[$i-20]; -- system("ppmmix $n junk2r$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2r$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - if ($i == 10) { -- system("ppmrelief junk2$$.ppm >junk2r$$.ppm"); -+ system("ppmrelief $tmpdir/junk2$$.ppm >$tmpdir/junk2r$$.ppm"); - } - } elsif ($mode eq $OIL) { - if ($i == 1) { -- system("ppmtopgm junk1$$.ppm | pgmoil >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk1o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmoil >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk1o$$.ppm"); - } - if ($i <= 10) { - my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n = $spline10[$i-10]; -- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = $spline10[$i-20]; -- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - if ($i == 10) { -- system("ppmtopgm junk2$$.ppm | pgmoil >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk2o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmoil >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk2o$$.ppm"); - } - } elsif ($mode eq $EDGE) { - if ($i == 1) { -- system("ppmtopgm junk1$$.ppm | pgmedge >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk1o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmedge >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk1o$$.ppm"); - } - if ($i <= 10) { - my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n = $spline10[$i-10]; -- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = $spline10[$i-20]; -- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - if ($i == 10) { -- system("ppmtopgm junk2$$.ppm | pgmedge >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk2o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmedge >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk2o$$.ppm"); - } - } elsif ($mode eq $BENTLEY) { - if ($i == 1) { -- system("ppmtopgm junk1$$.ppm | pgmbentley >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk1o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmbentley >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk1o$$.ppm"); - } - if ($i <= 10) { - my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n = $spline10[$i-10]; -- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = $spline10[$i-20]; -- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - if ($i == 10) { -- system("ppmtopgm junk2$$.ppm | pgmbentley >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk2o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmbentley >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk2o$$.ppm"); - } - } elsif ($mode eq $BLOCK) { - if ($i <= 10) { - my $n = 1 - 1.9*$spline20[$i]; -- system("pamscale $n junk1$$.ppm | " . -- "pamscale -width $width -height $height >junk3$$.ppm"); -+ system("pamscale $n $tmpdir/junk1$$.ppm | " . -+ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n = $spline10[$i-10]; -- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = 1 - 1.9*$spline20[31-$i]; -- system("pamscale $n junk2$$.ppm | " . -- "pamscale -width $width -height $height >junk3$$.ppm"); -+ system("pamscale $n $tmpdir/junk2$$.ppm | " . -+ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm"); - } - if ($i == 10) { -- system("cp", "junk3$$.ppm", "junk1a$$.ppm"); -- system("pamscale $n junk2$$.ppm | " . -- "pamscale -width $width -height $height >junk2a$$.ppm"); -+ system("cp", "$tmpdir/junk3$$.ppm", "$tmpdir/junk1a$$.ppm"); -+ system("pamscale $n $tmpdir/junk2$$.ppm | " . -+ "pamscale -width $width -height $height >$tmpdir/junk2a$$.ppm"); - } - } elsif ($mode eq $MIX) { - my $fade_factor = sqrt(1/($nframes-$i+1)); -- system("ppmmix $fade_factor junk1$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $fade_factor $tmpdir/junk1$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - print("Internal error: impossible mode value '$mode'\n"); - } - - my $outfile = sprintf("%s.%04d.ppm", $base_name, $i); -- system("cp", "junk3$$.ppm", $outfile); -+ system("cp", "$tmpdir/junk3$$.ppm", $outfile); - } - - # - # Clean up shop. - # --system("rm junk*$$.ppm"); -+system("rm $tmpdir/junk*$$.ppm"); - - exit(0); -Index: netpbm-10.93.0/editor/ppmshadow -=================================================================== ---- netpbm-10.93.0.orig/editor/ppmshadow 2020-12-29 11:04:15.768844529 +0100 -+++ netpbm-10.93.0/editor/ppmshadow 2020-12-29 11:06:05.909522666 +0100 +--- netpbm-11.2.0.orig/editor/ppmshadow ++++ netpbm-11.2.0/editor/ppmshadow @@ -194,9 +194,10 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp"; my $ourtmp; @@ -281,5 +14,5 @@ Index: netpbm-10.93.0/editor/ppmshadow + die "Can't create directory for temporary files"; + } } else { - $ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", UNLINK=>1); + $ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", CLEANUP=>1); } diff --git a/netpbm-tmpfile.patch b/netpbm-tmpfile.patch deleted file mode 100644 index bb4666a..0000000 --- a/netpbm-tmpfile.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: netpbm-10.93.0/editor/pnmindex.csh -=================================================================== ---- netpbm-10.93.0.orig/editor/pnmindex.csh 2020-12-29 11:08:57.854581338 +0100 -+++ netpbm-10.93.0/editor/pnmindex.csh 2020-12-29 11:09:01.634604611 +0100 -@@ -85,7 +85,7 @@ if ( $#argv == 0 ) then - goto usage - endif - --set tmpfile=/tmp/pi.tmp.$$ -+set tmpfile=.pi.tmp.$$ - rm -f $tmpfile - set maxformat=PBM - diff --git a/netpbm.changes b/netpbm.changes index 021d072..04bf702 100644 --- a/netpbm.changes +++ b/netpbm.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Fri Jun 23 09:11:02 UTC 2023 - pgajdos@suse.com + +- version update to 11.2.0 + * jpegtopnm: Add -traceexif + * pbmtextps: Add -asciihex, -ascii85. + * pcdovtoppm: remove dependency on obsolete 'tempfile' program. + * jpegtopnm: Many fixes to -dumpexif. Always broken. + (-dumpexif was new in Netpbm 9.18 (September 2001)) + * pamtopng: fix -chroma option: always rejected. Always broken. + (pamtopng was new in Netpbm 10.70 (June 2015)). + * pnmtopng: fix -rgb option: always rejected. Always broken + (-rgb was new in Netpbm 10.30 (October 2005)). + * build: change the way you add the separately distributed + 'hpcdtoppm' code to the build. + * lot of changes since last version update, see + https://sourceforge.net/p/netpbm/code/HEAD/tree/advanced/doc/HISTORY +- modified patches + % netpbm-gcc-warnings.patch (refreshed) + % netpbm-security-code.patch (refreshed) + % netpbm-security-scripts.patch (refreshed) +- deleted patches + - netpbm-tmpfile.patch (upstreamed) + - ppmforge-fix-overflow.patch (upstreamed) + - signed-char.patch (upstreamed) + ------------------------------------------------------------------- Thu Jan 19 09:15:10 UTC 2023 - Otto Hollmann diff --git a/netpbm.spec b/netpbm.spec index d2eb06d..84b46ba 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -20,10 +20,10 @@ %define asan_build 0 %define ubsan_build 0 %define libmaj 11 -%define libmin 96 +%define libmin 102 %define libver %{libmaj}.%{libmin} Name: netpbm -Version: 10.96.4 +Version: 11.2.0 Release: 0 Summary: A Graphics Conversion Package License: BSD-3-Clause AND GPL-2.0-or-later AND IJG AND MIT AND SUSE-Public-Domain @@ -36,17 +36,12 @@ Source3: prepare-src-tarball.sh # SUSE specific Patch0: %{name}-make.patch # neccessary for running with ASAN -Patch1: %{name}-tmpfile.patch Patch2: %{name}-security-code.patch Patch3: %{name}-security-scripts.patch Patch4: %{name}-gcc-warnings.patch Patch5: makeman-py3.patch -# PATCH-FIX-UPSTREAM fix bad use of plain char -Patch6: signed-char.patch # bsc#1144255 disable jpeg2k support due to removal of jasper Patch8: netpbm-disable-jasper.patch -# PATCH-FIX-UPSTREAM fix arithmetic overflow in ppmforge (https://sourceforge.net/p/netpbm/code/4428/) -Patch9: ppmforge-fix-overflow.patch BuildRequires: flex BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -159,6 +154,7 @@ sed -i '/all-in-place/d' test/Test-Order sed -i '/legacy-names/d' test/Test-Order # picttoppm.c: #error "Unfixable. Don't ship me" sed -i '/pict-roundtrip/d' test/Test-Order +sed -i '/stdin-ppm3.test/d' test/Test-Order # pstopnm is not shipped sed -i '/^l\?ps.*\.test/d' test/Test-Order # new winicon-roundtrip2.test failure reported to bryanh@giraffe-data.com on 2020-12-29 @@ -166,6 +162,9 @@ sed -i '/^l\?ps.*\.test/d' test/Test-Order # pamtowinicon: bad magic number 0xf0f - not a PAM, PPM, PGM, or PBM file # $ sed -i '/winicon-roundtrip2.test/d' test/Test-Order +# Unable to exec 'gs' +sed -i '/pbmtextps.test/d' test/Test-Order +sed -i '/stdin-pnm2.test/d' test/Test-Order mkdir package-test-{tmp,results} make pkgdir=`pwd`/package tmpdir=`pwd`/package-test-tmp RESULTDIR=`pwd`/package-test-results check-package diff --git a/ppmforge-fix-overflow.patch b/ppmforge-fix-overflow.patch deleted file mode 100644 index 8b2f6a5..0000000 --- a/ppmforge-fix-overflow.patch +++ /dev/null @@ -1,182 +0,0 @@ -Index: netpbm/generator/ppmforge.c -=================================================================== ---- netpbm/generator/ppmforge.c (revision 4427) -+++ netpbm/generator/ppmforge.c (revision 4428) -@@ -241,7 +241,7 @@ - - - static void --fourn(float * const data, -+fourn(double * const data, - const int * const nn, - int const ndim, - int const isign) { -@@ -272,7 +272,7 @@ - int i1, i2, i3; - int i2rev, i3rev, ip1, ip2, ip3, ifp1, ifp2; - int ibit, idim, k1, k2, n, nprev, nrem, ntot; -- float tempi, tempr; -+ double tempi, tempr; - double theta, wi, wpi, wpr, wr, wtemp; - - #define SWAP(a,b) tempr=(a); (a) = (b); (b) = tempr -@@ -401,7 +401,7 @@ - - - static void --spectralsynth(float ** const x, -+spectralsynth(double ** const aP, - unsigned int const n, - double const h, - struct Gauss * const gaussP) { -@@ -411,18 +411,20 @@ - This algorithm is given under the name SpectralSynthesisFM2D on page 108 of - Peitgen & Saupe. - -----------------------------------------------------------------------------*/ -- unsigned bl; -+ unsigned int const bl = ((((unsigned long) n) * n) + 1) * 2; -+ - int i, j, i0, j0, nsize[3]; - double rad, phase, rcos, rsin; -- float *a; -+ double * a; - -- bl = ((((unsigned long) n) * n) + 1) * 2 * sizeof(float); -- a = (float *) calloc(bl, 1); -- if (a == (float *) 0) { -- pm_error("Cannot allocate %d x %d result array (% d bytes).", -+ MALLOCARRAY(a, bl); -+ -+ if (!a) { -+ pm_error("Cannot allocate %u x %u result array (%u doubles).", - n, n, bl); - } -- *x = a; -+ for (i = 0; i < bl; ++i) -+ a[i] = 0.0; /* initial value */ - - for (i = 0; i <= n / 2; i++) { - for (j = 0; j <= n / 2; j++) { -@@ -463,6 +465,8 @@ - nsize[0] = 0; - nsize[1] = nsize[2] = n; /* Dimension of frequency domain array */ - fourn(a, nsize, 2, -1); /* Take inverse 2D Fourier transform */ -+ -+ *aP = a; - } - - -@@ -572,9 +576,9 @@ - - - static unsigned char * --makeCp(float * const a, -- unsigned int const n, -- pixval const maxval) { -+makeCp(const double * const a, -+ unsigned int const n, -+ pixval const maxval) { - - /* Prescale the grid points into intensities. */ - -@@ -587,7 +591,7 @@ - if (cp == NULL) - pm_error("Unable to allocate %u bytes for cp array", n); - -- ap = cp; -+ ap = cp; /* initial value */ - { - unsigned int i; - for (i = 0; i < n; i++) { -@@ -603,7 +607,7 @@ - - static void - createPlanetStuff(bool const clouds, -- float * const a, -+ const double * const a, - unsigned int const n, - double ** const uP, - double ** const u1P, -@@ -977,7 +981,7 @@ - static void - genplanet(bool const stars, - bool const clouds, -- float * const a, -+ const double * const a, - unsigned int const cols, - unsigned int const rows, - unsigned int const n, -@@ -1052,7 +1056,7 @@ - - - static void --applyPowerLawScaling(float * const a, -+applyPowerLawScaling(double * const a, - int const meshsize, - double const powscale) { - -@@ -1065,7 +1069,7 @@ - for (j = 0; j < meshsize; j++) { - double const r = Real(a, i, j); - if (r > 0) -- Real(a, i, j) = pow(r, powscale); -+ Real(a, i, j) = MIN(hugeVal, pow(r, powscale)); - } - } - } -@@ -1074,10 +1078,10 @@ - - - static void --computeExtremeReal(const float * const a, -- int const meshsize, -- double * const rminP, -- double * const rmaxP) { -+computeExtremeReal(const double * const a, -+ int const meshsize, -+ double * const rminP, -+ double * const rmaxP) { - - /* Compute extrema for autoscaling. */ - -@@ -1103,8 +1107,8 @@ - - - static void --replaceWithSpread(float * const a, -- int const meshsize) { -+replaceWithSpread(double * const a, -+ int const meshsize) { - /*---------------------------------------------------------------------------- - Replace the real part of each element of the 'a' array with a - measure of how far the real is from the middle; sort of a standard -@@ -1138,7 +1142,7 @@ - /*---------------------------------------------------------------------------- - Make a planet. - -----------------------------------------------------------------------------*/ -- float * a; -+ double * a; - bool error; - struct Gauss gauss; - -@@ -1149,7 +1153,7 @@ - error = FALSE; - } else { - spectralsynth(&a, meshsize, 3.0 - fracdim, &gauss); -- if (a == NULL) { -+ if (!a) { - error = TRUE; - } else { - applyPowerLawScaling(a, meshsize, powscale); -Index: netpbm/test/ppmforge.test -=================================================================== ---- netpbm/test/ppmforge.test (revision 4427) -+++ netpbm/test/ppmforge.test (revision 4428) -@@ -47,6 +47,6 @@ - -inclination 9 -hour 12 -power 200 > ${test_ppm} - ppmforge -seed 1 -stars 0 -ice 0.01 \ - -inclination 10 -hour 12 -power 200 | \ -- pnmpsnr -target1=53.89 -target2=49.38 -target3=65.15 - ${test_ppm} -+ pnmpsnr -target1=46.07 -target2=52.00 -target3=67.77 - ${test_ppm} - - rm ${test_ppm} diff --git a/signed-char.patch b/signed-char.patch deleted file mode 100644 index 727d74c..0000000 --- a/signed-char.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: netpbm-10.96.4/converter/other/pnmtopalm/palmtopnm.c -=================================================================== ---- netpbm-10.96.4.orig/converter/other/pnmtopalm/palmtopnm.c -+++ netpbm-10.96.4/converter/other/pnmtopalm/palmtopnm.c -@@ -873,7 +873,7 @@ readPackBitsRow(FILE * const if - pm_readcharu(ifP, &incountByte); - if (incountByte & 0x80) { - /* How do we handle incount == -128 ? */ -- int const signedIncount = (char)incountByte; -+ int const signedIncount = (signed char)incountByte; - unsigned int const runlength = -signedIncount + 1; - unsigned char inval; - pm_readcharu(ifP, &inval);