From 3859e032473daaeb03fd15d1561b6745b6df7546fbca2f8e1a78de819406451b Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Tue, 29 Dec 2020 11:51:30 +0000 Subject: [PATCH] - version update to 10.93.0 * lot of bug fixes and features, see HISTORY - modified patches % netpbm-disable-jasper.patch (refreshed) % netpbm-make.patch (refreshed) % netpbm-security-code.patch (refreshed) % netpbm-security-scripts.patch (refreshed) % netpbm-tmpfile.patch (refreshed) % signed-char.patch (refreshed) - deleted patches - netpbm-pbmtonokia-cmdline-txt-null.patch (upstreamed) OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=122 --- netpbm-10.88.1-documentation.tar.bz2 | 3 - ...bm-10.88.1-nohpcdtoppm-noppmtompeg.tar.bz2 | 3 - netpbm-10.93.0-documentation.tar.bz2 | 3 + ...bm-10.93.0-nohpcdtoppm-noppmtompeg.tar.bz2 | 3 + netpbm-disable-jasper.patch | 6 +- netpbm-make.patch | 18 +- netpbm-pbmtonokia-cmdline-txt-null.patch | 14 - netpbm-security-code.patch | 617 +++++++++--------- netpbm-security-scripts.patch | 14 +- netpbm-tmpfile.patch | 7 +- netpbm.changes | 15 + netpbm.spec | 45 +- signed-char.patch | 10 +- 13 files changed, 361 insertions(+), 397 deletions(-) delete mode 100644 netpbm-10.88.1-documentation.tar.bz2 delete mode 100644 netpbm-10.88.1-nohpcdtoppm-noppmtompeg.tar.bz2 create mode 100644 netpbm-10.93.0-documentation.tar.bz2 create mode 100644 netpbm-10.93.0-nohpcdtoppm-noppmtompeg.tar.bz2 delete mode 100644 netpbm-pbmtonokia-cmdline-txt-null.patch diff --git a/netpbm-10.88.1-documentation.tar.bz2 b/netpbm-10.88.1-documentation.tar.bz2 deleted file mode 100644 index 5112099..0000000 --- a/netpbm-10.88.1-documentation.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ed42c8c0a89df291385dd20345ae4b8167eb4d1b91fac4fd4dedd509615c03f -size 11760136 diff --git a/netpbm-10.88.1-nohpcdtoppm-noppmtompeg.tar.bz2 b/netpbm-10.88.1-nohpcdtoppm-noppmtompeg.tar.bz2 deleted file mode 100644 index b3a86d0..0000000 --- a/netpbm-10.88.1-nohpcdtoppm-noppmtompeg.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8e819ec825deeb55a7baf6083909f7497a29493c624ceb6eea608af611d210f -size 1920716 diff --git a/netpbm-10.93.0-documentation.tar.bz2 b/netpbm-10.93.0-documentation.tar.bz2 new file mode 100644 index 0000000..52e2a8f --- /dev/null +++ b/netpbm-10.93.0-documentation.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3967e5b68391a84df081234431e9b80d00cc1005f09f6317b86175c90c216616 +size 380106 diff --git a/netpbm-10.93.0-nohpcdtoppm-noppmtompeg.tar.bz2 b/netpbm-10.93.0-nohpcdtoppm-noppmtompeg.tar.bz2 new file mode 100644 index 0000000..b700e74 --- /dev/null +++ b/netpbm-10.93.0-nohpcdtoppm-noppmtompeg.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb6c2efb0f613fbc63dcc43e9315a346eb2e7be17554de7e676d4afbdc713ae6 +size 1959688 diff --git a/netpbm-disable-jasper.patch b/netpbm-disable-jasper.patch index d06ac6a..e947a42 100644 --- a/netpbm-disable-jasper.patch +++ b/netpbm-disable-jasper.patch @@ -1,7 +1,7 @@ -Index: netpbm-10.86.3/config.mk.in +Index: netpbm-10.93.0/config.mk.in =================================================================== ---- netpbm-10.86.3.orig/config.mk.in -+++ netpbm-10.86.3/config.mk.in +--- netpbm-10.93.0.orig/config.mk.in 2020-12-29 10:52:17.176428400 +0100 ++++ netpbm-10.93.0/config.mk.in 2020-12-29 10:52:17.328429333 +0100 @@ -482,7 +482,7 @@ JBIGLIB = $(INTERNAL_JBIGLIB) JBIGHDR_DIR = $(INTERNAL_JBIGHDR_DIR) diff --git a/netpbm-make.patch b/netpbm-make.patch index 1d0af58..a046527 100644 --- a/netpbm-make.patch +++ b/netpbm-make.patch @@ -1,8 +1,8 @@ -Index: config.mk.in +Index: netpbm-10.93.0/config.mk.in =================================================================== ---- config.mk.in.orig 2014-09-08 09:55:59.652026877 +0200 -+++ config.mk.in 2014-09-08 10:00:54.684021821 +0200 -@@ -120,7 +120,7 @@ +--- netpbm-10.93.0.orig/config.mk.in 2020-12-29 11:04:16.164846967 +0100 ++++ netpbm-10.93.0/config.mk.in 2020-12-29 11:04:21.900882283 +0100 +@@ -124,7 +124,7 @@ INSTALL = $(SRCDIR)/buildtools/install.s #OSF1: #INSTALL = $(SRCDIR)/buildtools/installosf #Red Hat Linux: @@ -11,7 +11,7 @@ Index: config.mk.in # STRIPFLAG is the option you pass to the above install program to make it # strip unnecessary information out of binaries. -@@ -306,7 +306,7 @@ +@@ -316,7 +316,7 @@ LDRELOC = NONE CFLAGS_SHLIB = # Gcc: #CFLAGS_SHLIB = -fpic @@ -20,7 +20,7 @@ Index: config.mk.in # Sun compiler: #CFLAGS_SHLIB = -Kpic #CFLAGS_SHLIB = -KPIC -@@ -373,7 +373,7 @@ +@@ -383,7 +383,7 @@ NETPBMLIB_RUNTIME_PATH = # The TIFF library. See above. If you want to build the tiff # converters, you must have the tiff library already installed. @@ -29,7 +29,7 @@ Index: config.mk.in TIFFHDR_DIR = #TIFFLIB = libtiff.so -@@ -404,7 +404,7 @@ +@@ -414,7 +414,7 @@ TIFFLIB_NEEDS_Z = Y # JPEG stuff statically linked in, in which case you won't need # JPEGLIB in order to build the Tiff converters. @@ -38,7 +38,7 @@ Index: config.mk.in JPEGHDR_DIR = #JPEGLIB = libjpeg.so #JPEGHDR_DIR = /usr/include/jpeg -@@ -462,7 +462,7 @@ +@@ -472,7 +472,7 @@ PNGVER = # # If you have 'libpng-config' (see above), these are irrelevant. @@ -47,7 +47,7 @@ Index: config.mk.in ZHDR_DIR = #ZLIB = libz.so -@@ -472,8 +472,8 @@ +@@ -482,8 +482,8 @@ JBIGLIB = $(INTERNAL_JBIGLIB) JBIGHDR_DIR = $(INTERNAL_JBIGHDR_DIR) # The Jasper JPEG-2000 image compression library (aka JasPer): diff --git a/netpbm-pbmtonokia-cmdline-txt-null.patch b/netpbm-pbmtonokia-cmdline-txt-null.patch deleted file mode 100644 index 4482b92..0000000 --- a/netpbm-pbmtonokia-cmdline-txt-null.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: netpbm-10.88.1/converter/pbm/pbmtonokia.c -=================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtonokia.c 2019-12-20 11:44:12.938955573 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtonokia.c 2020-05-04 14:28:15.636966434 +0200 -@@ -412,7 +412,8 @@ convertToNpm(bit ** const image, - header[ 3] = 0; - header[ 4] = len; - header[ 5] = 0; -- memcpy(&header[5], text, len); -+ if (text) -+ memcpy(&header[5], text, len); - header[ 6 + len] = cols; - header[ 7 + len] = rows; - header[ 8 + len] = 1; diff --git a/netpbm-security-code.patch b/netpbm-security-code.patch index 78bdc0a..c7dfd96 100644 --- a/netpbm-security-code.patch +++ b/netpbm-security-code.patch @@ -1,8 +1,8 @@ -Index: netpbm-10.88.1/analyzer/pgmtexture.c +Index: netpbm-10.93.0/analyzer/pgmtexture.c =================================================================== ---- netpbm-10.88.1.orig/analyzer/pgmtexture.c 2019-12-20 11:44:15.318969291 +0100 -+++ netpbm-10.88.1/analyzer/pgmtexture.c 2019-12-20 12:26:32.289748224 +0100 -@@ -97,7 +97,7 @@ vector(unsigned int const nl, +--- netpbm-10.93.0.orig/analyzer/pgmtexture.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/analyzer/pgmtexture.c 2020-12-29 11:04:36.008969144 +0100 +@@ -53,7 +53,7 @@ vector(unsigned int const nl, float * v; assert(nh >= nl); @@ -11,7 +11,7 @@ Index: netpbm-10.88.1/analyzer/pgmtexture.c MALLOCARRAY(v, (unsigned) (nh - nl + 1)); if (v == NULL) -@@ -129,6 +129,7 @@ matrix (unsigned int const nrl, +@@ -85,6 +85,7 @@ matrix (unsigned int const nrl, assert(nrh >= nrl); /* allocate pointers to rows */ @@ -19,7 +19,7 @@ Index: netpbm-10.88.1/analyzer/pgmtexture.c MALLOCARRAY(m, (unsigned) (nrh - nrl + 1)); if (m == NULL) pm_error("Unable to allocate memory for a matrix."); -@@ -136,7 +137,7 @@ matrix (unsigned int const nrl, +@@ -92,7 +93,7 @@ matrix (unsigned int const nrl, m -= ncl; assert (nch >= ncl); @@ -28,10 +28,10 @@ Index: netpbm-10.88.1/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.88.1/converter/other/gemtopnm.c +Index: netpbm-10.93.0/converter/other/gemtopnm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/gemtopnm.c 2019-12-20 11:44:10.826943398 +0100 -+++ netpbm-10.88.1/converter/other/gemtopnm.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/gemtopnm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/gemtopnm.c 2020-12-29 11:04:36.008969144 +0100 @@ -105,7 +105,7 @@ main(argc, argv) type = PPM_TYPE; @@ -41,10 +41,10 @@ Index: netpbm-10.88.1/converter/other/gemtopnm.c { /* allocate input row data structure */ int plane; -Index: netpbm-10.88.1/converter/other/jpegtopnm.c +Index: netpbm-10.93.0/converter/other/jpegtopnm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/jpegtopnm.c 2019-12-20 11:44:11.654948171 +0100 -+++ netpbm-10.88.1/converter/other/jpegtopnm.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/jpegtopnm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/jpegtopnm.c 2020-12-29 11:04:36.008969144 +0100 @@ -862,6 +862,8 @@ convertImage(FILE * /* Calculate output image dimensions so we can allocate space */ jpeg_calc_output_dimensions(cinfoP); @@ -54,22 +54,22 @@ Index: netpbm-10.88.1/converter/other/jpegtopnm.c /* Start decompressor */ jpeg_start_decompress(cinfoP); -Index: netpbm-10.88.1/converter/other/pbmtopgm.c +Index: netpbm-10.93.0/converter/other/pbmtopgm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/pbmtopgm.c 2019-12-20 11:44:12.122950867 +0100 -+++ netpbm-10.88.1/converter/other/pbmtopgm.c 2019-12-20 12:26:32.293748248 +0100 -@@ -47,6 +47,7 @@ main(int argc, char *argv[]) { - "than the image height (%u rows)", height, rows); +--- netpbm-10.93.0.orig/converter/other/pbmtopgm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/pbmtopgm.c 2020-12-29 11:04:36.008969144 +0100 +@@ -60,6 +60,7 @@ main(int argc, char *argv[]) { + outrow = pgm_allocrow(cols) ; + overflow2(width, height); maxval = MIN(PGM_OVERALLMAXVAL, width*height); pgm_writepgminit(stdout, cols, rows, maxval, 0) ; -Index: netpbm-10.88.1/converter/other/pnmtoddif.c +Index: netpbm-10.93.0/converter/other/pnmtoddif.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/pnmtoddif.c 2019-12-20 11:44:11.654948171 +0100 -+++ netpbm-10.88.1/converter/other/pnmtoddif.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/pnmtoddif.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/pnmtoddif.c 2020-12-29 11:04:36.008969144 +0100 @@ -629,6 +629,7 @@ main(int argc, char *argv[]) { switch (PNM_FORMAT_TYPE(format)) { case PBM_TYPE: @@ -86,19 +86,19 @@ Index: netpbm-10.88.1/converter/other/pnmtoddif.c ip.bytes_per_line = 3 * cols; ip.bits_per_pixel = 24; ip.spectral = 5; -Index: netpbm-10.88.1/converter/other/pnmtojpeg.c +Index: netpbm-10.93.0/converter/other/pnmtojpeg.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/pnmtojpeg.c 2019-12-20 11:44:12.118950845 +0100 -+++ netpbm-10.88.1/converter/other/pnmtojpeg.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/pnmtojpeg.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/pnmtojpeg.c 2020-12-29 11:04:36.012969168 +0100 @@ -606,7 +606,11 @@ read_scan_script(j_compress_ptr const ci - want JPOOL_PERMANENT. + want JPOOL_PERMANENT. */ const unsigned int scan_info_size = nscans * sizeof(jpeg_scan_info); -- jpeg_scan_info * const scan_info = +- jpeg_scan_info * const scan_info = + const jpeg_scan_info * scan_info; -+ ++ + overflow2(nscans, sizeof(jpeg_scan_info)); -+ ++ + scan_info = (jpeg_scan_info *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, @@ -111,7 +111,7 @@ Index: netpbm-10.88.1/converter/other/pnmtojpeg.c + overflow2(maxval+1, sizeof(JSAMPLE)); *rescale_p = (JSAMPLE *) (cinfo.mem->alloc_small) ((j_common_ptr) &cinfo, JPOOL_IMAGE, - (size_t) (((long) maxval + 1L) * + (size_t) (((long) maxval + 1L) * @@ -1016,6 +1022,7 @@ convert_scanlines(struct jpeg_compress_s */ @@ -119,15 +119,15 @@ Index: netpbm-10.88.1/converter/other/pnmtojpeg.c + overflow2(cinfo_p->image_width, cinfo_p->input_components); 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.88.1/converter/other/pnmtops.c + (unsigned int) cinfo_p->image_width * cinfo_p->input_components, +Index: netpbm-10.93.0/converter/other/pnmtops.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/pnmtops.c 2019-12-20 11:44:11.654948171 +0100 -+++ netpbm-10.88.1/converter/other/pnmtops.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/pnmtops.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/pnmtops.c 2020-12-29 11:04:36.012969168 +0100 @@ -294,17 +294,21 @@ parseCommandLine(int argc, const char ** validateCompDimension(width, 72, "-width value"); validateCompDimension(height, 72, "-height value"); - + + overflow2(width, 72); cmdlineP->width = width * 72; + overflow2(height, 72); @@ -147,10 +147,10 @@ Index: netpbm-10.88.1/converter/other/pnmtops.c cmdlineP->imageheight = imageheight * 72; } else -Index: netpbm-10.88.1/converter/other/pnmtorle.c +Index: netpbm-10.93.0/converter/other/pnmtorle.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/pnmtorle.c 2019-12-20 11:44:09.478935626 +0100 -+++ netpbm-10.88.1/converter/other/pnmtorle.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/pnmtorle.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/pnmtorle.c 2020-12-29 11:04:36.012969168 +0100 @@ -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.88.1/converter/other/pnmtorle.c */ /* * pnmtorle - A program which will convert pbmplus (ppm or pgm) images -Index: netpbm-10.88.1/converter/other/pnmtosgi.c +Index: netpbm-10.93.0/converter/other/pnmtosgi.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/pnmtosgi.c 2019-12-20 11:44:11.658948193 +0100 -+++ netpbm-10.88.1/converter/other/pnmtosgi.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/pnmtosgi.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/pnmtosgi.c 2020-12-29 11:04:36.012969168 +0100 @@ -185,6 +185,7 @@ buildChannels(FILE * const ifP, ScanElem * temp; @@ -172,10 +172,10 @@ Index: netpbm-10.88.1/converter/other/pnmtosgi.c MALLOCARRAY_NOFAIL(table, channels * rows); } else table = NULL; -Index: netpbm-10.88.1/converter/other/rletopnm.c +Index: netpbm-10.93.0/converter/other/rletopnm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/rletopnm.c 2019-12-20 11:44:09.478935626 +0100 -+++ netpbm-10.88.1/converter/other/rletopnm.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/rletopnm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/rletopnm.c 2020-12-29 11:04:36.012969168 +0100 @@ -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.88.1/converter/other/rletopnm.c */ /* * rletopnm - A conversion program to convert from Utah's "rle" image format -Index: netpbm-10.88.1/converter/other/sgitopnm.c +Index: netpbm-10.93.0/converter/other/sgitopnm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/sgitopnm.c 2019-12-20 11:44:11.654948171 +0100 -+++ netpbm-10.88.1/converter/other/sgitopnm.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/sgitopnm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/sgitopnm.c 2020-12-29 11:04:36.012969168 +0100 @@ -377,10 +377,14 @@ readChannels(FILE * const ifP, MALLOCARRAY_NOFAIL(image, head->ysize); } else { @@ -205,10 +205,10 @@ Index: netpbm-10.88.1/converter/other/sgitopnm.c for (channel = 0; channel < maxchannel; ++channel) { unsigned int row; -Index: netpbm-10.88.1/converter/other/sirtopnm.c +Index: netpbm-10.93.0/converter/other/sirtopnm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/sirtopnm.c 2019-12-20 11:44:11.662948217 +0100 -+++ netpbm-10.88.1/converter/other/sirtopnm.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/sirtopnm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/sirtopnm.c 2020-12-29 11:04:36.012969168 +0100 @@ -69,6 +69,7 @@ char* argv[]; } break; @@ -217,10 +217,10 @@ Index: netpbm-10.88.1/converter/other/sirtopnm.c picsize = cols * rows * 3; planesize = cols * rows; if ( !( sirarray = (unsigned char*) malloc( picsize ) ) ) -Index: netpbm-10.88.1/converter/other/tifftopnm.c +Index: netpbm-10.93.0/converter/other/tifftopnm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/tifftopnm.c 2019-12-20 11:44:11.654948171 +0100 -+++ netpbm-10.88.1/converter/other/tifftopnm.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/tifftopnm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/tifftopnm.c 2020-12-29 11:04:36.012969168 +0100 @@ -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.88.1/converter/other/tifftopnm.c if (samplebuf == NULL) pm_error("can't allocate memory for row buffer"); -Index: netpbm-10.88.1/converter/other/xwdtopnm.c +Index: netpbm-10.93.0/converter/other/xwdtopnm.c =================================================================== ---- netpbm-10.88.1.orig/converter/other/xwdtopnm.c 2019-12-20 11:44:11.654948171 +0100 -+++ netpbm-10.88.1/converter/other/xwdtopnm.c 2019-12-20 12:26:32.293748248 +0100 +--- netpbm-10.93.0.orig/converter/other/xwdtopnm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/other/xwdtopnm.c 2020-12-29 11:04:36.012969168 +0100 @@ -210,6 +210,10 @@ processX10Header(X10WDFileHeader * cons *colorsP = pnm_allocrow(2); PNM_ASSIGN1((*colorsP)[0], 0); @@ -255,10 +255,10 @@ Index: netpbm-10.88.1/converter/other/xwdtopnm.c *padrightP = h11FixedP->bytes_per_line * 8 - h11FixedP->pixmap_width * h11FixedP->bits_per_pixel; -Index: netpbm-10.88.1/converter/pbm/mdatopbm.c +Index: netpbm-10.93.0/converter/pbm/mdatopbm.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/mdatopbm.c 2019-12-20 11:44:12.934955551 +0100 -+++ netpbm-10.88.1/converter/pbm/mdatopbm.c 2019-12-20 12:26:32.297748271 +0100 +--- netpbm-10.93.0.orig/converter/pbm/mdatopbm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/mdatopbm.c 2020-12-29 11:04:36.012969168 +0100 @@ -245,10 +245,13 @@ main(int argc, char **argv) { pm_readlittleshort(infile, &yy); nInCols = yy; } @@ -274,10 +274,10 @@ Index: netpbm-10.88.1/converter/pbm/mdatopbm.c data = pbm_allocarray(nOutCols, nOutRows); -Index: netpbm-10.88.1/converter/pbm/mgrtopbm.c +Index: netpbm-10.93.0/converter/pbm/mgrtopbm.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/mgrtopbm.c 2019-12-20 11:44:12.950955642 +0100 -+++ netpbm-10.88.1/converter/pbm/mgrtopbm.c 2019-12-20 12:26:32.297748271 +0100 +--- netpbm-10.93.0.orig/converter/pbm/mgrtopbm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/mgrtopbm.c 2020-12-29 11:04:36.012969168 +0100 @@ -65,6 +65,8 @@ readMgrHeader(FILE * const ifP, if (head.h_high < ' ' || head.l_high < ' ') pm_error("Invalid width field in MGR header"); @@ -287,10 +287,10 @@ Index: netpbm-10.88.1/converter/pbm/mgrtopbm.c *colsP = (((int)head.h_wide - ' ') << 6) + ((int)head.l_wide - ' '); *rowsP = (((int)head.h_high - ' ') << 6) + ((int) head.l_high - ' '); *padrightP = ( ( *colsP + pad - 1 ) / pad ) * pad - *colsP; -Index: netpbm-10.88.1/converter/pbm/pbmtogem.c +Index: netpbm-10.93.0/converter/pbm/pbmtogem.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtogem.c 2019-12-20 11:44:12.934955551 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtogem.c 2019-12-20 12:26:32.297748271 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pbmtogem.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmtogem.c 2020-12-29 11:04:36.012969168 +0100 @@ -79,6 +79,7 @@ putinit (int const rows, int const cols) bitsperitem = 0; bitshift = 7; @@ -299,10 +299,10 @@ Index: netpbm-10.88.1/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.88.1/converter/pbm/pbmtogo.c +Index: netpbm-10.93.0/converter/pbm/pbmtogo.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtogo.c 2019-12-20 11:44:12.938955573 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtogo.c 2019-12-20 12:26:32.297748271 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pbmtogo.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmtogo.c 2020-12-29 11:04:36.012969168 +0100 @@ -158,6 +158,7 @@ main(int argc, bitrow = pbm_allocrow(cols); @@ -311,10 +311,10 @@ Index: netpbm-10.88.1/converter/pbm/pbmtogo.c rucols = ( cols + 7 ) / 8; bytesperrow = rucols; /* GraphOn uses bytes */ rucols = rucols * 8; -Index: netpbm-10.88.1/converter/pbm/pbmtolj.c +Index: netpbm-10.93.0/converter/pbm/pbmtolj.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtolj.c 2019-12-20 11:44:12.438952690 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtolj.c 2019-12-20 12:26:32.297748271 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pbmtolj.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmtolj.c 2020-12-29 11:04:36.012969168 +0100 @@ -120,7 +120,11 @@ parseCommandLine(int argc, char ** argv, static void allocateBuffers(unsigned int const cols) { @@ -327,10 +327,10 @@ Index: netpbm-10.88.1/converter/pbm/pbmtolj.c packBufferSize = rowBufferSize + (rowBufferSize + 127) / 128 + 1; deltaBufferSize = rowBufferSize + rowBufferSize / 8 + 10; -Index: netpbm-10.88.1/converter/pbm/pbmtomda.c +Index: netpbm-10.93.0/converter/pbm/pbmtomda.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtomda.c 2019-12-20 11:44:12.950955642 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtomda.c 2019-12-20 12:26:32.297748271 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pbmtomda.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmtomda.c 2020-12-29 11:04:36.012969168 +0100 @@ -179,6 +179,7 @@ int main(int argc, char **argv) nOutRowsUnrounded = bScale ? nInRows/2 : nInRows; @@ -339,10 +339,10 @@ Index: netpbm-10.88.1/converter/pbm/pbmtomda.c nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4; /* MDA wants rows a multiple of 4 */ nOutCols = nInCols / 8; -Index: netpbm-10.88.1/converter/pbm/pbmtoppa/pbm.c +Index: netpbm-10.93.0/converter/pbm/pbmtoppa/pbm.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtoppa/pbm.c 2019-12-20 11:44:12.434952667 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtoppa/pbm.c 2019-12-20 12:26:32.297748271 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pbmtoppa/pbm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmtoppa/pbm.c 2020-12-29 11:04:36.012969168 +0100 @@ -154,6 +154,7 @@ pbm_readline(pbm_stat * const pbmSt break; case P4: { @@ -359,10 +359,10 @@ Index: netpbm-10.88.1/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.88.1/converter/pbm/pbmtoppa/pbmtoppa.c +Index: netpbm-10.93.0/converter/pbm/pbmtoppa/pbmtoppa.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtoppa/pbmtoppa.c 2019-12-20 11:44:12.438952690 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtoppa/pbmtoppa.c 2019-12-20 12:26:32.333748478 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pbmtoppa/pbmtoppa.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmtoppa/pbmtoppa.c 2020-12-29 11:04:36.088969637 +0100 @@ -453,6 +453,7 @@ main(int argc, char *argv[]) { pm_error("main(): unrecognized parameter '%s'", argv[argn]); } @@ -371,23 +371,23 @@ Index: netpbm-10.88.1/converter/pbm/pbmtoppa/pbmtoppa.c Pwidth=(Width+7)/8; printer.fptr=out; -Index: netpbm-10.88.1/converter/pbm/pbmtoxbm.c +Index: netpbm-10.93.0/converter/pbm/pbmtoxbm.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmtoxbm.c 2019-12-20 11:44:12.438952690 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmtoxbm.c 2019-12-20 12:26:32.341748523 +0100 -@@ -352,6 +352,8 @@ convertRaster(FILE * const ifP, - +--- netpbm-10.93.0.orig/converter/pbm/pbmtoxbm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmtoxbm.c 2020-12-29 11:04:36.096969687 +0100 +@@ -353,6 +353,8 @@ convertRaster(FILE * const ifP, unsigned char * bitrow; unsigned int row; -+ -+ overflow_add(cols, padright); ++ overflow_add(cols, padright); ++ putinit(xbmVersion); -Index: netpbm-10.88.1/converter/pbm/pbmto4425.c + bitrow = pbm_allocrow_packed(cols + padright); +Index: netpbm-10.93.0/converter/pbm/pbmto4425.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pbmto4425.c 2019-12-20 11:44:12.938955573 +0100 -+++ netpbm-10.88.1/converter/pbm/pbmto4425.c 2019-12-20 12:26:32.341748523 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pbmto4425.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pbmto4425.c 2020-12-29 11:04:36.100969711 +0100 @@ -2,6 +2,7 @@ #include "nstring.h" @@ -405,10 +405,10 @@ Index: netpbm-10.88.1/converter/pbm/pbmto4425.c if(vmap == NULL) { pm_error( "Cannot allocate memory" ); -Index: netpbm-10.88.1/converter/pbm/pktopbm.c +Index: netpbm-10.93.0/converter/pbm/pktopbm.c =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/pktopbm.c 2019-12-20 11:44:12.946955620 +0100 -+++ netpbm-10.88.1/converter/pbm/pktopbm.c 2019-12-20 12:26:32.341748523 +0100 +--- netpbm-10.93.0.orig/converter/pbm/pktopbm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/pktopbm.c 2020-12-29 11:04:36.100969711 +0100 @@ -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.88.1/converter/pbm/pktopbm.c endofpacket = packetlength + pktopbm_pkloc; /* calculate end of packet */ if ((car >= MAXPKCHAR) || !filename[car]) { -Index: netpbm-10.88.1/converter/pbm/thinkjettopbm.l +Index: netpbm-10.93.0/converter/pbm/thinkjettopbm.l =================================================================== ---- netpbm-10.88.1.orig/converter/pbm/thinkjettopbm.l 2019-12-20 11:44:12.438952690 +0100 -+++ netpbm-10.88.1/converter/pbm/thinkjettopbm.l 2019-12-20 12:26:32.341748523 +0100 +--- netpbm-10.93.0.orig/converter/pbm/thinkjettopbm.l 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pbm/thinkjettopbm.l 2020-12-29 11:04:36.100969711 +0100 @@ -114,7 +114,9 @@ DIG [0-9] \033\*b{DIG}+W { int l; @@ -440,10 +440,10 @@ Index: netpbm-10.88.1/converter/pbm/thinkjettopbm.l pbm_writepbminit(stdout, maxRowLength*8, rowCount, 0); packed_bitrow = malloc(maxRowLength); -Index: netpbm-10.88.1/converter/pgm/lispmtopgm.c +Index: netpbm-10.93.0/converter/pgm/lispmtopgm.c =================================================================== ---- netpbm-10.88.1.orig/converter/pgm/lispmtopgm.c 2019-12-20 11:44:12.954955665 +0100 -+++ netpbm-10.88.1/converter/pgm/lispmtopgm.c 2019-12-20 12:26:32.341748523 +0100 +--- netpbm-10.93.0.orig/converter/pgm/lispmtopgm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pgm/lispmtopgm.c 2020-12-29 11:04:36.100969711 +0100 @@ -58,6 +58,7 @@ main( argc, argv ) pm_error( "depth (%d bits) is too large", depth); @@ -459,14 +459,14 @@ Index: netpbm-10.88.1/converter/pgm/lispmtopgm.c - + + overflow_add((int)colsP, 31); -+ ++ *padrightP = ( ( *colsP + 31 ) / 32 ) * 32 - *colsP; if ( *colsP != (cols_32 - *padrightP) ) { -Index: netpbm-10.88.1/converter/pgm/psidtopgm.c +Index: netpbm-10.93.0/converter/pgm/psidtopgm.c =================================================================== ---- netpbm-10.88.1.orig/converter/pgm/psidtopgm.c 2019-12-20 11:44:12.946955620 +0100 -+++ netpbm-10.88.1/converter/pgm/psidtopgm.c 2019-12-20 12:26:32.341748523 +0100 +--- netpbm-10.93.0.orig/converter/pgm/psidtopgm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/pgm/psidtopgm.c 2020-12-29 11:04:36.100969711 +0100 @@ -78,6 +78,7 @@ main(int argc, pm_error("bits/sample (%d) is too large.", bitspersample); @@ -475,10 +475,10 @@ Index: netpbm-10.88.1/converter/pgm/psidtopgm.c grayrow = pgm_allocrow((cols + 7) / 8 * 8); for (row = 0; row < rows; ++row) { unsigned int col; -Index: netpbm-10.88.1/converter/ppm/ilbmtoppm.c +Index: netpbm-10.93.0/converter/ppm/ilbmtoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ilbmtoppm.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/ilbmtoppm.c 2019-12-20 12:26:32.345748546 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ilbmtoppm.c 2020-12-29 11:04:16.004845981 +0100 ++++ netpbm-10.93.0/converter/ppm/ilbmtoppm.c 2020-12-29 11:04:36.100969711 +0100 @@ -608,6 +608,7 @@ decode_row(FILE * const ifP, rawtype *chp; @@ -550,10 +550,10 @@ Index: netpbm-10.88.1/converter/ppm/ilbmtoppm.c MALLOCARRAY_NOFAIL(ilbmrow, RowBytes(bmhdP->w)); *viewportmodesP |= fakeviewport; /* -isham/-isehb */ -Index: netpbm-10.88.1/converter/ppm/imgtoppm.c +Index: netpbm-10.93.0/converter/ppm/imgtoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/imgtoppm.c 2019-12-20 11:44:15.314969267 +0100 -+++ netpbm-10.88.1/converter/ppm/imgtoppm.c 2019-12-20 12:26:32.345748546 +0100 +--- netpbm-10.93.0.orig/converter/ppm/imgtoppm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/imgtoppm.c 2020-12-29 11:04:36.100969711 +0100 @@ -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.88.1/converter/ppm/imgtoppm.c if ( len != cols * rows ) pm_message( "pixel data length (%d) does not match image size (%d)", -Index: netpbm-10.88.1/converter/ppm/Makefile +Index: netpbm-10.93.0/converter/ppm/Makefile =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/Makefile 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/Makefile 2019-12-20 12:26:32.345748546 +0100 +--- netpbm-10.93.0.orig/converter/ppm/Makefile 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/Makefile 2020-12-29 11:04:36.100969711 +0100 @@ -11,7 +11,7 @@ SUBDIRS = hpcdtoppm ppmtompeg PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \ @@ -583,10 +583,10 @@ Index: netpbm-10.88.1/converter/ppm/Makefile ppmtoacad ppmtoapplevol ppmtoarbtxt ppmtoascii \ ppmtobmp ppmtoeyuv ppmtogif ppmtoicr ppmtoilbm \ ppmtoleaf ppmtolj ppmtomitsu ppmtoneo \ -Index: netpbm-10.88.1/converter/ppm/pcxtoppm.c +Index: netpbm-10.93.0/converter/ppm/pcxtoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/pcxtoppm.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/pcxtoppm.c 2019-12-20 12:26:32.345748546 +0100 +--- netpbm-10.93.0.orig/converter/ppm/pcxtoppm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/pcxtoppm.c 2020-12-29 11:04:36.100969711 +0100 @@ -409,6 +409,7 @@ pcx_planes_to_pixels(pixels, bitplanes, /* * clear the pixel buffer @@ -603,47 +603,47 @@ Index: netpbm-10.88.1/converter/ppm/pcxtoppm.c rawcols = BytesPerLine * 8 / BitsPerPixel; if (headerCols > rawcols) { pm_message("warning - BytesPerLine = %d, " -Index: netpbm-10.88.1/converter/ppm/picttoppm.c +Index: netpbm-10.93.0/converter/ppm/picttoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/picttoppm.c 2019-12-20 11:44:12.946955620 +0100 -+++ netpbm-10.88.1/converter/ppm/picttoppm.c 2019-12-20 12:26:32.345748546 +0100 +--- netpbm-10.93.0.orig/converter/ppm/picttoppm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/picttoppm.c 2020-12-29 11:04:36.100969711 +0100 @@ -1,3 +1,5 @@ +#error "Unfixable. Don't ship me" + /* * picttoppm.c -- convert a MacIntosh PICT file to PPM format. * -Index: netpbm-10.88.1/converter/ppm/pjtoppm.c +Index: netpbm-10.93.0/converter/ppm/pjtoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/pjtoppm.c 2019-12-20 11:44:12.946955620 +0100 -+++ netpbm-10.88.1/converter/ppm/pjtoppm.c 2019-12-20 12:26:32.345748546 +0100 -@@ -149,14 +149,20 @@ main(int argc, const char ** argv) { +--- netpbm-10.93.0.orig/converter/ppm/pjtoppm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/pjtoppm.c 2020-12-29 11:04:36.104969735 +0100 +@@ -168,14 +168,20 @@ main(int argc, const char ** argv) { case 'V': /* send plane */ case 'W': /* send last plane */ - if (rows == -1 || row >= rows || image == NULL) { -- if (rows == -1 || row >= rows) -+ if (rows == -1 || row >= rows) { + if (row >= rowsX || image == NULL) { +- if (row >= rowsX) ++ if (row >= rowsX) { + overflow_add(rows, 100); - rows += 100; + rowsX += 100; + } if (image == NULL) { -- MALLOCARRAY(image, uintProduct(rows, planes)); -- MALLOCARRAY(imlen, uintProduct(rows, planes)); +- MALLOCARRAY(image, uintProduct(rowsX, planes)); +- MALLOCARRAY(imlen, uintProduct(rowsX, planes)); + image = (unsigned char **) -+ malloc3(rows , planes , sizeof(unsigned char *)); -+ imlen = (int *) malloc3(rows , planes, sizeof(int)); ++ malloc3(rowsX , planes , sizeof(unsigned char *)); ++ imlen = (int *) malloc3(rowsX , planes, sizeof(int)); } else { -- REALLOCARRAY(image, uintProduct(rows, planes)); -- REALLOCARRAY(imlen, uintProduct(rows, planes)); +- REALLOCARRAY(image, uintProduct(rowsX, planes)); +- REALLOCARRAY(imlen, uintProduct(rowsX, planes)); + overflow2(rows,planes); + image = (unsigned char **) -+ realloc2(image, rows * planes, ++ realloc2(image, rowsX * planes, + sizeof(unsigned char *)); -+ imlen = (int *) realloc2(imlen, rows * planes, sizeof(int)); ++ imlen = (int *) realloc2(imlen, rowsX * planes, sizeof(int)); } } if (image == NULL || imlen == NULL) -@@ -235,8 +241,10 @@ main(int argc, const char ** argv) { +@@ -263,8 +269,10 @@ main(int argc, const char ** argv) { col += 2) for (cmd = image[plane + row * planes][col], val = image[plane + row * planes][col+1]; @@ -655,7 +655,7 @@ Index: netpbm-10.88.1/converter/ppm/pjtoppm.c cols = MAX(cols, i); free(image[plane + row * planes]); /* -@@ -247,6 +255,7 @@ main(int argc, const char ** argv) { +@@ -275,6 +283,7 @@ main(int argc, const char ** argv) { image[plane + row * planes] = realloc(buf, i); } } @@ -663,10 +663,10 @@ Index: netpbm-10.88.1/converter/ppm/pjtoppm.c cols *= 8; } -Index: netpbm-10.88.1/converter/ppm/ppmtoeyuv.c +Index: netpbm-10.93.0/converter/ppm/ppmtoeyuv.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtoeyuv.c 2019-12-20 11:44:14.606965187 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtoeyuv.c 2019-12-20 12:26:32.345748546 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtoeyuv.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtoeyuv.c 2020-12-29 11:04:36.104969735 +0100 @@ -114,6 +114,7 @@ create_multiplication_tables(const pixva int index; @@ -675,10 +675,10 @@ Index: netpbm-10.88.1/converter/ppm/ppmtoeyuv.c MALLOCARRAY_NOFAIL(mult299 , maxval+1); MALLOCARRAY_NOFAIL(mult587 , maxval+1); MALLOCARRAY_NOFAIL(mult114 , maxval+1); -Index: netpbm-10.88.1/converter/ppm/ppmtoilbm.c +Index: netpbm-10.93.0/converter/ppm/ppmtoilbm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtoilbm.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtoilbm.c 2019-12-20 12:26:32.345748546 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtoilbm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtoilbm.c 2020-12-29 11:04:36.104969735 +0100 @@ -190,6 +190,7 @@ makeValTable(int const oldmaxval, unsigned int i; int * table; @@ -715,24 +715,22 @@ Index: netpbm-10.88.1/converter/ppm/ppmtoilbm.c } switch (mode) { -Index: netpbm-10.88.1/converter/ppm/ppmtolj.c +Index: netpbm-10.93.0/converter/ppm/ppmtolj.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtolj.c 2019-12-20 11:44:15.314969267 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtolj.c 2019-12-20 12:26:32.345748546 +0100 -@@ -181,7 +181,8 @@ int main(int argc, char *argv[]) { - +--- netpbm-10.93.0.orig/converter/ppm/ppmtolj.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtolj.c 2020-12-29 11:04:36.104969735 +0100 +@@ -182,6 +182,7 @@ int main(int argc, char *argv[]) { ppm_readppminit( ifp, &cols, &rows, &maxval, &format ); pixelrow = ppm_allocrow( cols ); -- -+ + + overflow2(cols, 6); 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.88.1/converter/ppm/ppmtomitsu.c +Index: netpbm-10.93.0/converter/ppm/ppmtomitsu.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtomitsu.c 2019-12-20 11:44:12.946955620 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtomitsu.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtomitsu.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtomitsu.c 2020-12-29 11:04:36.104969735 +0100 @@ -685,6 +685,8 @@ main(int argc, char * argv[]) { medias = MSize_User; @@ -742,23 +740,24 @@ Index: netpbm-10.88.1/converter/ppm/ppmtomitsu.c medias.maxcols *= 2; medias.maxrows *= 2; } -Index: netpbm-10.88.1/converter/ppm/ppmtopcx.c +Index: netpbm-10.93.0/converter/ppm/ppmtopcx.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtopcx.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtopcx.c 2019-12-20 12:26:32.349748569 +0100 -@@ -425,6 +425,8 @@ ppmTo16ColorPcx(pixel ** cons - else Planes = 1; - } - } -+ overflow2(BitsPerPixel, cols); -+ overflow_add(BitsPerPixel * cols, 7); - BytesPerLine = ((cols * BitsPerPixel) + 7) / 8; +--- netpbm-10.93.0.orig/converter/ppm/ppmtopcx.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtopcx.c 2020-12-29 11:05:57.373470107 +0100 +@@ -410,6 +410,9 @@ writeRaster16Color(FILE * const ofP, + + unsigned int row; + ++ /* see bytesPerLine definition above */ ++ overflow2(bitsPerPixel, cols); ++ overflow_add(bitsPerPixel * cols, 7); MALLOCARRAY_NOFAIL(indexRow, cols); - MALLOCARRAY_NOFAIL(planesrow, BytesPerLine); -Index: netpbm-10.88.1/converter/ppm/ppmtopict.c + MALLOCARRAY(planesrow, bytesPerLine); + +Index: netpbm-10.93.0/converter/ppm/ppmtopict.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtopict.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtopict.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtopict.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtopict.c 2020-12-29 11:04:36.104969735 +0100 @@ -450,6 +450,8 @@ main(int argc, const char ** argv) { putShort(stdout, 0); /* mode */ @@ -768,10 +767,10 @@ Index: netpbm-10.88.1/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.88.1/converter/ppm/ppmtopj.c +Index: netpbm-10.93.0/converter/ppm/ppmtopj.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtopj.c 2019-12-20 11:44:14.330963597 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtopj.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtopj.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtopj.c 2020-12-29 11:04:36.104969735 +0100 @@ -179,6 +179,7 @@ char *argv[]; pixels = ppm_readppm( ifp, &cols, &rows, &maxval ); @@ -780,10 +779,10 @@ Index: netpbm-10.88.1/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.88.1/converter/ppm/ppmtopjxl.c +Index: netpbm-10.93.0/converter/ppm/ppmtopjxl.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtopjxl.c 2019-12-20 11:44:15.310969244 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtopjxl.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtopjxl.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtopjxl.c 2020-12-29 11:04:36.104969735 +0100 @@ -266,6 +266,8 @@ main(int argc, const char * argv[]) { pm_error("image too large; reduce with ppmscale"); if (maxval > PCL_MAXVAL) @@ -816,10 +815,10 @@ Index: netpbm-10.88.1/converter/ppm/ppmtopjxl.c inrow = (char *)malloc((unsigned)bpp); outrow = (char *)malloc((unsigned)bpp*2); runcnt = (signed char *)malloc((unsigned)bpp); -Index: netpbm-10.88.1/converter/ppm/ppmtowinicon.c +Index: netpbm-10.93.0/converter/ppm/ppmtowinicon.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtowinicon.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtowinicon.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtowinicon.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtowinicon.c 2020-12-29 11:04:36.104969735 +0100 @@ -12,6 +12,7 @@ #include @@ -863,10 +862,10 @@ Index: netpbm-10.88.1/converter/ppm/ppmtowinicon.c entry->size_in_bytes = xorBitmap->size + andBitmap->size + 40 + (4 * entry->color_count); if (verbose) -Index: netpbm-10.88.1/converter/ppm/ppmtoxpm.c +Index: netpbm-10.93.0/converter/ppm/ppmtoxpm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ppmtoxpm.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/ppmtoxpm.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/ppmtoxpm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ppmtoxpm.c 2020-12-29 11:04:36.104969735 +0100 @@ -198,6 +198,7 @@ genNumstr(unsigned int const input, int unsigned int i; @@ -883,10 +882,10 @@ Index: netpbm-10.88.1/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.88.1/converter/ppm/qrttoppm.c +Index: netpbm-10.93.0/converter/ppm/qrttoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/qrttoppm.c 2019-12-20 11:44:15.306969222 +0100 -+++ netpbm-10.88.1/converter/ppm/qrttoppm.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/qrttoppm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/qrttoppm.c 2020-12-29 11:04:36.104969735 +0100 @@ -46,7 +46,7 @@ main( argc, argv ) ppm_writeppminit( stdout, cols, rows, maxval, 0 ); @@ -896,10 +895,10 @@ Index: netpbm-10.88.1/converter/ppm/qrttoppm.c if ( buf == (unsigned char *) 0 ) pm_error( "out of memory" ); -Index: netpbm-10.88.1/converter/ppm/sldtoppm.c +Index: netpbm-10.93.0/converter/ppm/sldtoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/sldtoppm.c 2019-12-20 11:44:14.326963575 +0100 -+++ netpbm-10.88.1/converter/ppm/sldtoppm.c 2019-12-20 12:26:32.349748569 +0100 +--- netpbm-10.93.0.orig/converter/ppm/sldtoppm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/sldtoppm.c 2020-12-29 11:04:36.104969735 +0100 @@ -506,6 +506,8 @@ slider(slvecfn slvec, /* Allocate image buffer and clear it to black. */ @@ -909,35 +908,11 @@ Index: netpbm-10.88.1/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.88.1/converter/ppm/ximtoppm.c +Index: netpbm-10.93.0/converter/ppm/ximtoppm.c =================================================================== ---- netpbm-10.88.1.orig/converter/ppm/ximtoppm.c 2019-12-20 11:44:15.310969244 +0100 -+++ netpbm-10.88.1/converter/ppm/ximtoppm.c 2019-12-20 12:26:32.349748569 +0100 -@@ -118,6 +118,7 @@ ReadXimHeader(FILE * const in_fp, - header->bits_channel = atoi(a_head.bits_per_channel); - header->alpha_flag = atoi(a_head.alpha_channel); - if (strlen(a_head.author)) { -+ overflow_add(strlen(a_head.author),1); - if (!(header->author = calloc((unsigned int)strlen(a_head.author)+1, - 1))) { - pm_message("ReadXimHeader: can't calloc author string" ); -@@ -127,6 +128,7 @@ ReadXimHeader(FILE * const in_fp, - strncpy(header->author, a_head.author, strlen(a_head.author)); - } - if (strlen(a_head.date)) { -+ overflow_add(strlen(a_head.date),1); - if (!(header->date =calloc((unsigned int)strlen(a_head.date)+1,1))){ - pm_message("ReadXimHeader: can't calloc date string" ); - return(0); -@@ -135,6 +137,7 @@ ReadXimHeader(FILE * const in_fp, - strncpy(header->date, a_head.date, strlen(a_head.date)); - } - if (strlen(a_head.program)) { -+ overflow_add(strlen(a_head.program),1); - if (!(header->program = calloc( - (unsigned int)strlen(a_head.program) + 1, 1))) { - pm_message("ReadXimHeader: can't calloc program string" ); -@@ -161,6 +164,7 @@ ReadXimHeader(FILE * const in_fp, +--- netpbm-10.93.0.orig/converter/ppm/ximtoppm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/converter/ppm/ximtoppm.c 2020-12-29 11:04:36.124969859 +0100 +@@ -147,6 +147,7 @@ ReadXimHeader(FILE * const in_fp, if (header->nchannels == 3 && header->bits_channel == 8) header->ncolors = 0; else if (header->nchannels == 1 && header->bits_channel == 8) { @@ -945,11 +920,11 @@ Index: netpbm-10.88.1/converter/ppm/ximtoppm.c header->colors = (Color *)calloc((unsigned int)header->ncolors, sizeof(Color)); if (header->colors == NULL) { -Index: netpbm-10.88.1/editor/pamcut.c +Index: netpbm-10.93.0/editor/pamcut.c =================================================================== ---- netpbm-10.88.1.orig/editor/pamcut.c 2019-12-20 11:44:16.042973465 +0100 -+++ netpbm-10.88.1/editor/pamcut.c 2019-12-20 12:26:32.349748569 +0100 -@@ -773,6 +773,8 @@ cutOneImage(FILE * const ifP +--- netpbm-10.93.0.orig/editor/pamcut.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pamcut.c 2020-12-29 11:04:36.124969859 +0100 +@@ -799,6 +799,8 @@ cutOneImage(FILE * const ifP outpam = inpam; /* Initial value -- most fields should be same */ outpam.file = ofP; @@ -958,10 +933,10 @@ Index: netpbm-10.88.1/editor/pamcut.c outpam.width = rightcol - leftcol + 1; outpam.height = bottomrow - toprow + 1; -Index: netpbm-10.88.1/editor/pbmreduce.c +Index: netpbm-10.93.0/editor/pbmreduce.c =================================================================== ---- netpbm-10.88.1.orig/editor/pbmreduce.c 2019-12-20 11:44:15.902972658 +0100 -+++ netpbm-10.88.1/editor/pbmreduce.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/pbmreduce.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pbmreduce.c 2020-12-29 11:04:36.124969859 +0100 @@ -150,6 +150,7 @@ initializeFloydSteinberg(struct FS * co unsigned int col; @@ -970,10 +945,10 @@ Index: netpbm-10.88.1/editor/pbmreduce.c MALLOCARRAY(fsP->thiserr, newcols + 2); MALLOCARRAY(fsP->nexterr, newcols + 2); -Index: netpbm-10.88.1/editor/pnmgamma.c +Index: netpbm-10.93.0/editor/pnmgamma.c =================================================================== ---- netpbm-10.88.1.orig/editor/pnmgamma.c 2019-12-20 11:44:15.902972658 +0100 -+++ netpbm-10.88.1/editor/pnmgamma.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/pnmgamma.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pnmgamma.c 2020-12-29 11:04:36.124969859 +0100 @@ -596,6 +596,7 @@ createGammaTables(enum transferFunction xelval ** const btableP) { @@ -982,10 +957,10 @@ Index: netpbm-10.88.1/editor/pnmgamma.c MALLOCARRAY(*rtableP, maxval+1); MALLOCARRAY(*gtableP, maxval+1); MALLOCARRAY(*btableP, maxval+1); -Index: netpbm-10.88.1/editor/pnmhisteq.c +Index: netpbm-10.93.0/editor/pnmhisteq.c =================================================================== ---- netpbm-10.88.1.orig/editor/pnmhisteq.c 2019-12-20 11:44:16.038973442 +0100 -+++ netpbm-10.88.1/editor/pnmhisteq.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/pnmhisteq.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pnmhisteq.c 2020-12-29 11:04:36.124969859 +0100 @@ -107,6 +107,7 @@ computeLuminosityHistogram(xel * const * unsigned int pixelCount; unsigned int * lumahist; @@ -994,10 +969,10 @@ Index: netpbm-10.88.1/editor/pnmhisteq.c MALLOCARRAY(lumahist, maxval + 1); if (lumahist == NULL) pm_error("Out of storage allocating array for %u histogram elements", -Index: netpbm-10.88.1/editor/pnmindex.csh +Index: netpbm-10.93.0/editor/pnmindex.csh =================================================================== ---- netpbm-10.88.1.orig/editor/pnmindex.csh 2019-12-20 12:26:32.277748156 +0100 -+++ netpbm-10.88.1/editor/pnmindex.csh 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/pnmindex.csh 2020-12-29 11:04:29.184927129 +0100 ++++ netpbm-10.93.0/editor/pnmindex.csh 2020-12-29 11:04:36.124969859 +0100 @@ -1,5 +1,8 @@ #!/bin/csh -f # @@ -1007,11 +982,11 @@ Index: netpbm-10.88.1/editor/pnmindex.csh # pnmindex - build a visual index of a bunch of anymaps # # Copyright (C) 1991 by Jef Poskanzer. -Index: netpbm-10.88.1/editor/pnmpad.c +Index: netpbm-10.93.0/editor/pnmpad.c =================================================================== ---- netpbm-10.88.1.orig/editor/pnmpad.c 2019-12-20 11:44:15.898972634 +0100 -+++ netpbm-10.88.1/editor/pnmpad.c 2019-12-20 12:26:32.353748593 +0100 -@@ -634,6 +634,8 @@ main(int argc, const char ** argv) { +--- netpbm-10.93.0.orig/editor/pnmpad.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pnmpad.c 2020-12-29 11:04:36.124969859 +0100 +@@ -654,6 +654,8 @@ main(int argc, const char ** argv) { computePadSizes(cmdline, cols, rows, &lpad, &rpad, &tpad, &bpad); @@ -1019,11 +994,11 @@ Index: netpbm-10.88.1/editor/pnmpad.c + overflow_add(cols + lpad, rpad); newcols = cols + lpad + rpad; - if (PNM_FORMAT_TYPE(format) == PBM_TYPE) -Index: netpbm-10.88.1/editor/pnmremap.c + if (cmdline.reportonly) +Index: netpbm-10.93.0/editor/pnmremap.c =================================================================== ---- netpbm-10.88.1.orig/editor/pnmremap.c 2019-12-20 11:44:15.322969313 +0100 -+++ netpbm-10.88.1/editor/pnmremap.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/pnmremap.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pnmremap.c 2020-12-29 11:04:36.124969859 +0100 @@ -467,7 +467,7 @@ fserr_init(struct pam * const pamP, unsigned int plane; @@ -1041,10 +1016,10 @@ Index: netpbm-10.88.1/editor/pnmremap.c for (col = 0; col < pamP->width + 2; ++col) { unsigned int plane; for (plane = 0; plane < pamP->depth; ++plane) -Index: netpbm-10.88.1/editor/pnmscalefixed.c +Index: netpbm-10.93.0/editor/pnmscalefixed.c =================================================================== ---- netpbm-10.88.1.orig/editor/pnmscalefixed.c 2019-12-20 11:44:16.038973442 +0100 -+++ netpbm-10.88.1/editor/pnmscalefixed.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/pnmscalefixed.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pnmscalefixed.c 2020-12-29 11:04:36.128969883 +0100 @@ -214,6 +214,8 @@ compute_output_dimensions(const struct c const int rows, const int cols, int * newrowsP, int * newcolsP) { @@ -1058,7 +1033,7 @@ Index: netpbm-10.88.1/editor/pnmscalefixed.c if (*newcolsP < 1) *newcolsP = 1; if (*newrowsP < 1) *newrowsP = 1; -+ ++ + overflow2(*newcolsP, *newrowsP); } @@ -1067,16 +1042,16 @@ Index: netpbm-10.88.1/editor/pnmscalefixed.c unfilled. We can address that by stretching, whereas the other case would require throwing away some of the input. */ -+ ++ + overflow2(newcols, SCALE); + overflow2(newrows, SCALE); sxscale = SCALE * newcols / cols; syscale = SCALE * newrows / rows; -Index: netpbm-10.88.1/editor/pnmshear.c +Index: netpbm-10.93.0/editor/pnmshear.c =================================================================== ---- netpbm-10.88.1.orig/editor/pnmshear.c 2019-12-20 11:44:15.898972634 +0100 -+++ netpbm-10.88.1/editor/pnmshear.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/pnmshear.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/pnmshear.c 2020-12-29 11:04:36.128969883 +0100 @@ -15,6 +15,7 @@ #include #include @@ -1085,22 +1060,22 @@ Index: netpbm-10.88.1/editor/pnmshear.c #include "pm_c_util.h" #include "mallocvar.h" -@@ -242,6 +243,11 @@ main(int argc, const char * argv[]) { +@@ -235,6 +236,11 @@ main(int argc, const char * argv[]) { - shearfac = fabs(tan(cmdline.angle)); + shearfac = tan(cmdline.angle); + if(rows * shearfac >= INT_MAX-1) + pm_error("image too large"); -+ ++ + overflow_add(rows * shearfac, cols+1); + - newcols = rows * shearfac + cols + 0.999999; - - pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0); -Index: netpbm-10.88.1/editor/ppmdither.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.93.0/editor/ppmdither.c =================================================================== ---- netpbm-10.88.1.orig/editor/ppmdither.c 2019-12-20 11:44:16.042973465 +0100 -+++ netpbm-10.88.1/editor/ppmdither.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/ppmdither.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/ppmdither.c 2020-12-29 11:04:36.128969883 +0100 @@ -355,7 +355,11 @@ dithMatrix(unsigned int const dithPower) unsigned int const dithMatSize = (dithDim * sizeof(*dithMat)) + /* pointers */ @@ -1114,10 +1089,10 @@ Index: netpbm-10.88.1/editor/ppmdither.c dithMat = malloc(dithMatSize); if (dithMat == NULL) -Index: netpbm-10.88.1/editor/specialty/pamoil.c +Index: netpbm-10.93.0/editor/specialty/pamoil.c =================================================================== ---- netpbm-10.88.1.orig/editor/specialty/pamoil.c 2019-12-20 11:44:15.894972613 +0100 -+++ netpbm-10.88.1/editor/specialty/pamoil.c 2019-12-20 12:26:32.353748593 +0100 +--- netpbm-10.93.0.orig/editor/specialty/pamoil.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/editor/specialty/pamoil.c 2020-12-29 11:04:36.128969883 +0100 @@ -112,6 +112,7 @@ main(int argc, char *argv[] ) { tuples = pnm_readpam(ifp, &inpam, PAM_STRUCT_SIZE(tuple_type)); pm_close(ifp); @@ -1126,11 +1101,11 @@ Index: netpbm-10.88.1/editor/specialty/pamoil.c MALLOCARRAY(hist, inpam.maxval + 1); if (hist == NULL) pm_error("Unable to allocate memory for histogram."); -Index: netpbm-10.88.1/generator/pbmtext.c +Index: netpbm-10.93.0/generator/pbmtext.c =================================================================== ---- netpbm-10.88.1.orig/generator/pbmtext.c 2019-12-20 11:44:16.350975240 +0100 -+++ netpbm-10.88.1/generator/pbmtext.c 2019-12-20 12:26:32.353748593 +0100 -@@ -1016,6 +1016,7 @@ getText(PM_WCHAR const cmdlineText +--- netpbm-10.93.0.orig/generator/pbmtext.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/generator/pbmtext.c 2020-12-29 11:04:36.128969883 +0100 +@@ -1144,6 +1144,7 @@ getText(PM_WCHAR const cmdli "Cannot process", lineCount, (unsigned int) MAXLINECHARS); if (lineCount >= maxlines) { @@ -1138,7 +1113,7 @@ Index: netpbm-10.88.1/generator/pbmtext.c maxlines *= 2; REALLOCARRAY(textArray, maxlines); if (textArray == NULL) -@@ -1056,6 +1057,7 @@ computeMargins(struct CmdlineInfo const +@@ -1184,6 +1185,7 @@ computeMargins(struct CmdlineInfo const *hmarginP = fontP->maxwidth; } else { *vmarginP = fontP->maxheight; @@ -1146,10 +1121,10 @@ Index: netpbm-10.88.1/generator/pbmtext.c *hmarginP = 2 * fontP->maxwidth; } } -Index: netpbm-10.88.1/generator/pgmkernel.c +Index: netpbm-10.93.0/generator/pgmkernel.c =================================================================== ---- netpbm-10.88.1.orig/generator/pgmkernel.c 2019-12-20 11:44:16.358975288 +0100 -+++ netpbm-10.88.1/generator/pgmkernel.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/generator/pgmkernel.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/generator/pgmkernel.c 2020-12-29 11:04:36.128969883 +0100 @@ -214,6 +214,7 @@ main(int argc, const char * argv[]) { /* Output matrix is symmetric vertically and horizontally. */ @@ -1158,23 +1133,23 @@ Index: netpbm-10.88.1/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.88.1/lib/libpammap.c +Index: netpbm-10.93.0/lib/libpammap.c =================================================================== ---- netpbm-10.88.1.orig/lib/libpammap.c 2019-12-20 11:44:16.818977939 +0100 -+++ netpbm-10.88.1/lib/libpammap.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/lib/libpammap.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/lib/libpammap.c 2020-12-29 11:04:36.128969883 +0100 @@ -108,6 +108,8 @@ allocTupleIntListItem(struct pam * const */ struct tupleint_list_item * retval; + overflow2(pamP->depth, sizeof(sample)); + overflow_add(sizeof(*retval)-sizeof(retval->tupleint.tuple), pamP->depth*sizeof(sample)); - unsigned int const size = - sizeof(*retval) - sizeof(retval->tupleint.tuple) + unsigned int const size = + sizeof(*retval) - sizeof(retval->tupleint.tuple) + pamP->depth * sizeof(sample); -Index: netpbm-10.88.1/lib/libpbm1.c +Index: netpbm-10.93.0/lib/libpbm1.c =================================================================== ---- netpbm-10.88.1.orig/lib/libpbm1.c 2019-12-20 11:44:16.818977939 +0100 -+++ netpbm-10.88.1/lib/libpbm1.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/lib/libpbm1.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/lib/libpbm1.c 2020-12-29 11:04:36.128969883 +0100 @@ -79,6 +79,7 @@ pbm_check(FILE * const fil } else { pm_filepos const bytesPerRow = (cols+7)/8; @@ -1183,10 +1158,10 @@ Index: netpbm-10.88.1/lib/libpbm1.c pm_check(fileP, checkType, needRasterSize, retvalP); } } -Index: netpbm-10.88.1/lib/libpm.c +Index: netpbm-10.93.0/lib/libpm.c =================================================================== ---- netpbm-10.88.1.orig/lib/libpm.c 2019-12-20 11:44:16.810977894 +0100 -+++ netpbm-10.88.1/lib/libpm.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/lib/libpm.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/lib/libpm.c 2020-12-29 11:04:36.128969883 +0100 @@ -889,4 +889,53 @@ pm_parse_height(const char * const arg) } @@ -1194,7 +1169,7 @@ Index: netpbm-10.88.1/lib/libpm.c +/* + * Maths wrapping + */ -+ ++ +void __overflow2(int a, int b) +{ + if(a < 0 || b < 0) @@ -1241,10 +1216,10 @@ Index: netpbm-10.88.1/lib/libpm.c + return realloc(a, b*c); +} -Index: netpbm-10.88.1/lib/pm.h +Index: netpbm-10.93.0/lib/pm.h =================================================================== ---- netpbm-10.88.1.orig/lib/pm.h 2019-12-20 11:44:16.810977894 +0100 -+++ netpbm-10.88.1/lib/pm.h 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/lib/pm.h 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/lib/pm.h 2020-12-29 11:04:36.128969883 +0100 @@ -442,4 +442,11 @@ pm_parse_height(const char * const arg); #endif @@ -1257,10 +1232,10 @@ Index: netpbm-10.88.1/lib/pm.h +void overflow_add(int, int); + #endif -Index: netpbm-10.88.1/other/pnmcolormap.c +Index: netpbm-10.93.0/other/pnmcolormap.c =================================================================== ---- netpbm-10.88.1.orig/other/pnmcolormap.c 2019-12-20 11:44:17.810983658 +0100 -+++ netpbm-10.88.1/other/pnmcolormap.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/other/pnmcolormap.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/other/pnmcolormap.c 2020-12-29 11:04:36.128969883 +0100 @@ -1002,6 +1002,7 @@ colormapToSquare(struct pam * const pamP pamP->width = intsqrt; else @@ -1269,10 +1244,10 @@ Index: netpbm-10.88.1/other/pnmcolormap.c } { unsigned int const intQuotient = colormap.size / pamP->width; -Index: netpbm-10.88.1/urt/README +Index: netpbm-10.93.0/urt/README =================================================================== ---- netpbm-10.88.1.orig/urt/README 2019-12-20 11:44:19.190991616 +0100 -+++ netpbm-10.88.1/urt/README 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/README 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/README 2020-12-29 11:04:36.128969883 +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 @@ -1282,10 +1257,10 @@ Index: netpbm-10.88.1/urt/README +Removed pipe through and compress support (unsafe) + +Alan Cox -Index: netpbm-10.88.1/urt/rle_addhist.c +Index: netpbm-10.93.0/urt/rle_addhist.c =================================================================== ---- netpbm-10.88.1.orig/urt/rle_addhist.c 2019-12-20 11:44:19.186991593 +0100 -+++ netpbm-10.88.1/urt/rle_addhist.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/rle_addhist.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/rle_addhist.c 2020-12-29 11:04:36.132969908 +0100 @@ -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, @@ -1330,10 +1305,10 @@ Index: netpbm-10.88.1/urt/rle_addhist.c ++length; /*Cater for the null. */ MALLOCARRAY(newc, length); -Index: netpbm-10.88.1/urt/rle_getrow.c +Index: netpbm-10.93.0/urt/rle_getrow.c =================================================================== ---- netpbm-10.88.1.orig/urt/rle_getrow.c 2019-12-20 11:44:19.190991616 +0100 -+++ netpbm-10.88.1/urt/rle_getrow.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/rle_getrow.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/rle_getrow.c 2020-12-29 11:04:36.132969908 +0100 @@ -17,6 +17,8 @@ * * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire @@ -1351,10 +1326,10 @@ Index: netpbm-10.88.1/urt/rle_getrow.c evenlen = (comlen + 1) & ~1; /* make it even */ if (evenlen) { MALLOCARRAY(comment_buf, evenlen); -Index: netpbm-10.88.1/urt/rle_hdr.c +Index: netpbm-10.93.0/urt/rle_hdr.c =================================================================== ---- netpbm-10.88.1.orig/urt/rle_hdr.c 2019-12-20 11:44:19.186991593 +0100 -+++ netpbm-10.88.1/urt/rle_hdr.c 2019-12-20 12:29:52.266896324 +0100 +--- netpbm-10.93.0.orig/urt/rle_hdr.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/rle_hdr.c 2020-12-29 11:04:36.132969908 +0100 @@ -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, @@ -1390,10 +1365,10 @@ Index: netpbm-10.88.1/urt/rle_hdr.c size *= sizeof(char *); toHdrP->comments = malloc(size); if (!toHdrP->comments) -Index: netpbm-10.88.1/urt/rle.h +Index: netpbm-10.93.0/urt/rle.h =================================================================== ---- netpbm-10.88.1.orig/urt/rle.h 2019-12-20 11:44:19.178991547 +0100 -+++ netpbm-10.88.1/urt/rle.h 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/rle.h 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/rle.h 2020-12-29 11:04:36.132969908 +0100 @@ -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, @@ -1408,10 +1383,10 @@ Index: netpbm-10.88.1/urt/rle.h */ extern rle_hdr rle_dflt_hdr; -+/* ++/* + * Provided by pm library + */ -+ ++ +extern void overflow_add(int, int); +#define overflow2(a,b) __overflow2(a,b) +extern void __overflow2(int, int); @@ -1422,10 +1397,10 @@ Index: netpbm-10.88.1/urt/rle.h /* Declare RLE library routines. */ -Index: netpbm-10.88.1/urt/rle_open_f.c +Index: netpbm-10.93.0/urt/rle_open_f.c =================================================================== ---- netpbm-10.88.1.orig/urt/rle_open_f.c 2019-12-20 11:44:19.190991616 +0100 -+++ netpbm-10.88.1/urt/rle_open_f.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/rle_open_f.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/rle_open_f.c 2020-12-29 11:04:36.132969908 +0100 @@ -163,65 +163,7 @@ dealWithSubprocess(const char * const f FILE ** const fpP, bool * const noSubprocessP, @@ -1440,10 +1415,10 @@ Index: netpbm-10.88.1/urt/rle_open_f.c - - /* Real file, not stdin or stdout. If name ends in ".Z", - * pipe from/to un/compress (depending on r/w mode). -- * +- * - * If it starts with "|", popen that command. - */ -- +- - cp = file_name + strlen(file_name) - 2; - /* Pipe case. */ - if (file_name[0] == '|') { @@ -1465,14 +1440,14 @@ Index: netpbm-10.88.1/urt/rle_open_f.c - const char * command; - - *noSubprocessP = FALSE; -- +- - if (*mode == 'w') - pm_asprintf(&command, "compress > %s", file_name); - else if (*mode == 'a') - pm_asprintf(&command, "compress >> %s", file_name); - else - pm_asprintf(&command, "compress -d < %s", file_name); -- +- - *fpP = my_popen(command, mode, &thepid); - - if (*fpP == NULL) @@ -1492,10 +1467,10 @@ Index: netpbm-10.88.1/urt/rle_open_f.c } -Index: netpbm-10.88.1/urt/rle_putcom.c +Index: netpbm-10.93.0/urt/rle_putcom.c =================================================================== ---- netpbm-10.88.1.orig/urt/rle_putcom.c 2019-12-20 11:44:19.186991593 +0100 -+++ netpbm-10.88.1/urt/rle_putcom.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/rle_putcom.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/rle_putcom.c 2020-12-29 11:04:36.132969908 +0100 @@ -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, @@ -1521,10 +1496,10 @@ Index: netpbm-10.88.1/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.88.1/urt/Runput.c +Index: netpbm-10.93.0/urt/Runput.c =================================================================== ---- netpbm-10.88.1.orig/urt/Runput.c 2019-12-20 11:44:19.190991616 +0100 -+++ netpbm-10.88.1/urt/Runput.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/Runput.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/Runput.c 2020-12-29 11:04:36.132969908 +0100 @@ -17,6 +17,8 @@ * * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire @@ -1557,10 +1532,10 @@ Index: netpbm-10.88.1/urt/Runput.c if ( h_cmap == NULL ) { fprintf( stderr, -Index: netpbm-10.88.1/urt/scanargs.c +Index: netpbm-10.93.0/urt/scanargs.c =================================================================== ---- netpbm-10.88.1.orig/urt/scanargs.c 2019-12-20 11:44:19.190991616 +0100 -+++ netpbm-10.88.1/urt/scanargs.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/urt/scanargs.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/urt/scanargs.c 2020-12-29 11:04:36.132969908 +0100 @@ -38,6 +38,8 @@ * * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire @@ -1571,20 +1546,20 @@ Index: netpbm-10.88.1/urt/scanargs.c #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 ) ) +-#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.88.1/lib/libpam.c +Index: netpbm-10.93.0/lib/libpam.c =================================================================== ---- netpbm-10.88.1.orig/lib/libpam.c 2019-12-20 11:44:16.814977915 +0100 -+++ netpbm-10.88.1/lib/libpam.c 2019-12-20 12:26:32.357748615 +0100 +--- netpbm-10.93.0.orig/lib/libpam.c 2020-12-29 11:04:16.008846007 +0100 ++++ netpbm-10.93.0/lib/libpam.c 2020-12-29 11:04:36.132969908 +0100 @@ -225,7 +225,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 ab8a40c..ada860a 100644 --- a/netpbm-security-scripts.patch +++ b/netpbm-security-scripts.patch @@ -1,7 +1,7 @@ -Index: netpbm-10.75.1/editor/ppmfade +Index: netpbm-10.93.0/editor/ppmfade =================================================================== ---- netpbm-10.75.1.orig/editor/ppmfade 2016-08-22 11:03:30.561767005 +0200 -+++ netpbm-10.75.1/editor/ppmfade 2016-08-22 16:44:34.091984993 +0200 +--- 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" "$@" # ############################################################################## @@ -265,11 +265,11 @@ Index: netpbm-10.75.1/editor/ppmfade +system("rm $tmpdir/junk*$$.ppm"); exit(0); -Index: netpbm-10.75.1/editor/ppmshadow +Index: netpbm-10.93.0/editor/ppmshadow =================================================================== ---- netpbm-10.75.1.orig/editor/ppmshadow 2016-08-22 16:44:34.091984993 +0200 -+++ netpbm-10.75.1/editor/ppmshadow 2016-08-22 16:45:25.404862701 +0200 -@@ -170,9 +170,10 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp"; +--- 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 +@@ -194,9 +194,10 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp"; my $ourtmp; if ($keeptemp) { diff --git a/netpbm-tmpfile.patch b/netpbm-tmpfile.patch index 86b8bf5..bb4666a 100644 --- a/netpbm-tmpfile.patch +++ b/netpbm-tmpfile.patch @@ -1,7 +1,7 @@ -Index: editor/pnmindex.csh +Index: netpbm-10.93.0/editor/pnmindex.csh =================================================================== ---- editor/pnmindex.csh.orig -+++ 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 @@ -11,4 +11,3 @@ Index: editor/pnmindex.csh rm -f $tmpfile set maxformat=PBM - diff --git a/netpbm.changes b/netpbm.changes index f9b2891..08ac678 100644 --- a/netpbm.changes +++ b/netpbm.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Dec 29 11:49:55 UTC 2020 - pgajdos@suse.com + +- version update to 10.93.0 + * lot of bug fixes and features, see HISTORY +- modified patches + % netpbm-disable-jasper.patch (refreshed) + % netpbm-make.patch (refreshed) + % netpbm-security-code.patch (refreshed) + % netpbm-security-scripts.patch (refreshed) + % netpbm-tmpfile.patch (refreshed) + % signed-char.patch (refreshed) +- deleted patches + - netpbm-pbmtonokia-cmdline-txt-null.patch (upstreamed) + ------------------------------------------------------------------- Mon May 4 12:42:15 UTC 2020 - pgajdos@suse.com diff --git a/netpbm.spec b/netpbm.spec index 8513af7..4d44d83 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -20,10 +20,10 @@ %define asan_build 0 %define ubsan_build 0 %define libmaj 11 -%define libmin 88 +%define libmin 93 %define libver %{libmaj}.%{libmin} Name: netpbm -Version: 10.88.1 +Version: 10.93.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,19 +36,17 @@ Source3: prepare-src-tarball.sh # SUSE specific Patch0: %{name}-make.patch # neccessary for running with ASAN -Patch3: %{name}-tmpfile.patch -Patch4: %{name}-security-code.patch -Patch5: %{name}-security-scripts.patch -Patch6: %{name}-gcc-warnings.patch -Patch7: makeman-py3.patch +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 -Patch8: signed-char.patch +Patch6: signed-char.patch # PATCH-FIX-UPSTREAM fix dependency on byte order -Patch9: big-endian.patch +Patch7: big-endian.patch # bsc#1144255 disable jpeg2k support due to removal of jasper -Patch10: netpbm-disable-jasper.patch -# bsc#1170831 -- sent to bryanh@giraffe-data.com on 2020-05-04 -Patch11: netpbm-pbmtonokia-cmdline-txt-null.patch +Patch8: netpbm-disable-jasper.patch BuildRequires: flex BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -95,16 +93,7 @@ source package. %prep %setup -q -D -a 1 -%patch0 -%patch3 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 +%autopatch -p1 mkdir pnmtopalm # for %%doc pnmtopalm cp -p converter/other/pnmtopalm/{LICENSE,README} pnmtopalm @@ -117,7 +106,7 @@ sed -i "s:STATICLIB_TOO = y:STATICLIB_TOO = n:" config.mk echo 'install.manweb:' >> converter/ppm/hpcdtoppm/Makefile # dtto for ppmtompeg echo 'install.manweb:' >> converter/ppm/ppmtompeg/Makefile -export CFLAGS="%{optflags} -flax-vector-conversions" +export CFLAGS="%{optflags} -flax-vector-conversions -Wno-return-type" %if %{debug_build} export CFLAGS="$CFLAGS -O0" %endif @@ -172,11 +161,11 @@ sed -i '/legacy-names/d' test/Test-Order sed -i '/pict-roundtrip/d' test/Test-Order # pstopnm is not shipped sed -i '/^l\?ps.*\.test/d' test/Test-Order -# pnmquant.test seems to be broken?: I do not get "Expected failure 7" and "Expected failure 8": -# pnmquant -spreadbrightness -spreadluminosity 16 testimg.ppm -# pnmquant -floyd -nofloyd 16 testimg.ppm -# both succedes ($? == 0) -sed -i '/pnmquant.test/d' test/Test-Order +# new winicon-roundtrip2.test failure reported to bryanh@giraffe-data.com on 2020-12-29 +# $ LD_LIBRARY_PATH=lib PATH=package/bin pamtowinicon -pngthreshold=1 package-test-tmp/testimg1.pam +# pamtowinicon: bad magic number 0xf0f - not a PAM, PPM, PGM, or PBM file +# $ +sed -i '/winicon-roundtrip2.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/signed-char.patch b/signed-char.patch index 5d54af2..7549f7a 100644 --- a/signed-char.patch +++ b/signed-char.patch @@ -1,8 +1,8 @@ -Index: netpbm-10.86.3/converter/other/pnmtopalm/palmtopnm.c +Index: netpbm-10.93.0/converter/other/pnmtopalm/palmtopnm.c =================================================================== ---- netpbm-10.86.3.orig/converter/other/pnmtopalm/palmtopnm.c -+++ netpbm-10.86.3/converter/other/pnmtopalm/palmtopnm.c -@@ -823,7 +823,7 @@ readPackBitsRow16(FILE * const +--- netpbm-10.93.0.orig/converter/other/pnmtopalm/palmtopnm.c 2020-12-29 11:04:15.564843272 +0100 ++++ netpbm-10.93.0/converter/other/pnmtopalm/palmtopnm.c 2020-12-29 11:06:16.809589774 +0100 +@@ -825,7 +825,7 @@ readPackBitsRow16(FILE * const unsigned int j; for (j = 0; j < bytesPerRow; ) { @@ -11,7 +11,7 @@ Index: netpbm-10.86.3/converter/other/pnmtopalm/palmtopnm.c pm_readchar(ifP, &incount); if (incount < 0) { /* How do we handle incount == -128 ? */ -@@ -865,7 +865,7 @@ readPackBitsRow(FILE * const if +@@ -868,7 +868,7 @@ readPackBitsRow(FILE * const if unsigned int j; for (j = 0; j < bytesPerRow; ) {