From ee793efc728fafe011475d47ddb3407a66d0c6098d43f9e0e635eedb70f88447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 17:00:20 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main netpbm revision 199457418c3c2a398058c6f3d8ffbc9c --- .gitattributes | 23 + baselibs.conf | 1 + makeman-py3.patch | 10 + netpbm-11.5.2-documentation.tar.bz2 | 3 + netpbm-11.5.2-nohpcdtoppm-noppmtompeg.tar.bz2 | 3 + netpbm-disable-jasper.patch | 13 + netpbm-gcc-warnings.patch | 45 + netpbm-make.patch | 60 + netpbm-security-code.patch | 1187 +++++++++++++ netpbm-security-scripts.patch | 18 + netpbm-use-byrow-when-needed.patch | 77 + netpbm.changes | 1578 +++++++++++++++++ netpbm.spec | 190 ++ prepare-src-tarball.sh | 38 + 14 files changed, 3246 insertions(+) create mode 100644 .gitattributes create mode 100644 baselibs.conf create mode 100644 makeman-py3.patch create mode 100644 netpbm-11.5.2-documentation.tar.bz2 create mode 100644 netpbm-11.5.2-nohpcdtoppm-noppmtompeg.tar.bz2 create mode 100644 netpbm-disable-jasper.patch create mode 100644 netpbm-gcc-warnings.patch create mode 100644 netpbm-make.patch create mode 100644 netpbm-security-code.patch create mode 100644 netpbm-security-scripts.patch create mode 100644 netpbm-use-byrow-when-needed.patch create mode 100644 netpbm.changes create mode 100644 netpbm.spec create mode 100644 prepare-src-tarball.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..f609137 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libnetpbm11 diff --git a/makeman-py3.patch b/makeman-py3.patch new file mode 100644 index 0000000..54a75bf --- /dev/null +++ b/makeman-py3.patch @@ -0,0 +1,10 @@ +Index: netpbm-10.80.1/buildtools/makeman +=================================================================== +--- netpbm-10.80.1.orig/buildtools/makeman ++++ netpbm-10.80.1/buildtools/makeman +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # makeman -- compile netpbm's stereotyped HTML to troff markup + # diff --git a/netpbm-11.5.2-documentation.tar.bz2 b/netpbm-11.5.2-documentation.tar.bz2 new file mode 100644 index 0000000..6302759 --- /dev/null +++ b/netpbm-11.5.2-documentation.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd3414f2b7043add99ad4cb4d9c7245c316c198c00ccf469c27ecbe4334f0443 +size 12265487 diff --git a/netpbm-11.5.2-nohpcdtoppm-noppmtompeg.tar.bz2 b/netpbm-11.5.2-nohpcdtoppm-noppmtompeg.tar.bz2 new file mode 100644 index 0000000..e9f16be --- /dev/null +++ b/netpbm-11.5.2-nohpcdtoppm-noppmtompeg.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9338190116a6bb4fb32611843fb64b71e1f50e5760a9a161bf127ec92085e3c8 +size 2011337 diff --git a/netpbm-disable-jasper.patch b/netpbm-disable-jasper.patch new file mode 100644 index 0000000..e947a42 --- /dev/null +++ b/netpbm-disable-jasper.patch @@ -0,0 +1,13 @@ +Index: netpbm-10.93.0/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) + + # The Jasper JPEG-2000 image compression library (aka JasPer): +-JASPERLIB = -ljasper ++JASPERLIB = NONE + JASPERHDR_DIR = /usr/include/jasper + # JASPERDEPLIBS is the libraries (-l options or file names) on which + # The Jasper library depends -- i.e. what you have to link into any diff --git a/netpbm-gcc-warnings.patch b/netpbm-gcc-warnings.patch new file mode 100644 index 0000000..3a51188 --- /dev/null +++ b/netpbm-gcc-warnings.patch @@ -0,0 +1,45 @@ +Index: netpbm-11.5.2/converter/other/pngx.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/pngx.c ++++ netpbm-11.5.2/converter/other/pngx.c +@@ -370,6 +370,7 @@ pngx_srgbIntentDesc(pngx_srgbIntent cons + case PNGX_ABSOLUTE_COLORIMETRIC: return "ABSOLUTE_COLORIMETRIC"; + } + assert(false); ++ return NULL; + } + + +@@ -385,6 +386,7 @@ const libpngSrgbIntentCode(pngx_srgbInte + } + + assert(false); /* All cases above return */ ++ return -1; + } + + +Index: netpbm-11.5.2/lib/libpm.c +=================================================================== +--- netpbm-11.5.2.orig/lib/libpm.c ++++ netpbm-11.5.2/lib/libpm.c +@@ -440,6 +440,7 @@ pm_maxvaltobits(int const maxval) { + pm_error( "maxval of %d is too large!", maxval ); + + assert(false); ++ return 0; + } + + +Index: netpbm-11.5.2/lib/libpnm3.c +=================================================================== +--- netpbm-11.5.2.orig/lib/libpnm3.c ++++ netpbm-11.5.2/lib/libpnm3.c +@@ -446,6 +446,8 @@ pnm_bittoxel(bit const inputBit, + case PBM_WHITE: return pnm_whitexel(maxval, PBM_TYPE); break; + default: + assert(false); ++ pixel const black = {0, 0, 0}; ++ return black; + } + } + diff --git a/netpbm-make.patch b/netpbm-make.patch new file mode 100644 index 0000000..a046527 --- /dev/null +++ b/netpbm-make.patch @@ -0,0 +1,60 @@ +Index: netpbm-10.93.0/config.mk.in +=================================================================== +--- 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: +-#INSTALL = install ++INSTALL = install + + # STRIPFLAG is the option you pass to the above install program to make it + # strip unnecessary information out of binaries. +@@ -316,7 +316,7 @@ LDRELOC = NONE + CFLAGS_SHLIB = + # Gcc: + #CFLAGS_SHLIB = -fpic +-#CFLAGS_SHLIB = -fPIC ++CFLAGS_SHLIB = -fPIC + # Sun compiler: + #CFLAGS_SHLIB = -Kpic + #CFLAGS_SHLIB = -KPIC +@@ -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. + +-TIFFLIB = NONE ++TIFFLIB = libtiff.so + TIFFHDR_DIR = + + #TIFFLIB = libtiff.so +@@ -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. + +-JPEGLIB = NONE ++JPEGLIB = libjpeg.so + JPEGHDR_DIR = + #JPEGLIB = libjpeg.so + #JPEGHDR_DIR = /usr/include/jpeg +@@ -472,7 +472,7 @@ PNGVER = + # + # If you have 'libpng-config' (see above), these are irrelevant. + +-ZLIB = NONE ++ZLIB = libz.so + ZHDR_DIR = + #ZLIB = libz.so + +@@ -482,8 +482,8 @@ JBIGLIB = $(INTERNAL_JBIGLIB) + JBIGHDR_DIR = $(INTERNAL_JBIGHDR_DIR) + + # The Jasper JPEG-2000 image compression library (aka JasPer): +-JASPERLIB = $(INTERNAL_JASPERLIB) +-JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR) ++JASPERLIB = -ljasper ++JASPERHDR_DIR = /usr/include/jasper + # JASPERDEPLIBS is the libraries (-l options or file names) on which + # The Jasper library depends -- i.e. what you have to link into any + # executable that links in the Jasper library. diff --git a/netpbm-security-code.patch b/netpbm-security-code.patch new file mode 100644 index 0000000..a30a53e --- /dev/null +++ b/netpbm-security-code.patch @@ -0,0 +1,1187 @@ +Index: netpbm-11.5.2/analyzer/pgmtexture.c +=================================================================== +--- netpbm-11.5.2.orig/analyzer/pgmtexture.c ++++ netpbm-11.5.2/analyzer/pgmtexture.c +@@ -98,7 +98,7 @@ vector(unsigned int const nl, + unsigned int i; + + assert(nh >= nl); assert(nh <= UINT_MAX-1); +- ++ overflow_add(nh - nl, 1); + MALLOCARRAY(v, (unsigned) (nh - nl + 1)); + + if (v == NULL) +@@ -136,6 +136,7 @@ matrix (unsigned int const nrl, + assert(nrh >= nrl); assert(nrh <= UINT_MAX-1); + + /* allocate pointers to rows */ ++ overflow_add(nrh - nrl, 1); + MALLOCARRAY(matrix, (unsigned) (nrh - nrl + 1)); + if (matrix == NULL) + pm_error("Unable to allocate memory for a matrix."); +@@ -143,7 +144,7 @@ matrix (unsigned int const nrl, + matrix -= ncl; + + assert (nch >= ncl); assert(nch <= UINT_MAX-1); +- ++ overflow_add(nch - ncl, 1); + /* allocate rows and set pointers to them */ + for (i = nrl; i <= nrh; ++i) { + MALLOCARRAY(matrix[i], (unsigned) (nch - ncl + 1)); +Index: netpbm-11.5.2/converter/other/gemtopnm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/gemtopnm.c ++++ netpbm-11.5.2/converter/other/gemtopnm.c +@@ -152,7 +152,7 @@ main(int argc, const char ** argv) { + type = PPM_TYPE; + + pnm_writepnminit(stdout, cols, rows, MAXVAL, type, 0); +- ++ overflow_add(cols, padright); + { + /* allocate input row data structure */ + unsigned int plane; +Index: netpbm-11.5.2/converter/other/jpegtopnm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/jpegtopnm.c ++++ netpbm-11.5.2/converter/other/jpegtopnm.c +@@ -894,6 +894,8 @@ convertImage(FILE * + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfoP); + ++ overflow2(cinfoP->output_width, cinfoP->output_components); ++ + /* Start decompressor */ + jpeg_start_decompress(cinfoP); + +Index: netpbm-11.5.2/converter/other/pbmtopgm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/pbmtopgm.c ++++ netpbm-11.5.2/converter/other/pbmtopgm.c +@@ -88,6 +88,7 @@ main(int argc, const char ** argv) { + up = cmdline.convRows / 2; down = cmdline.convRows - up; + + outrow = pgm_allocrow(cols) ; ++ overflow2(cmdline.convCols, cmdline.convRows); + maxval = MIN(PGM_OVERALLMAXVAL, cmdline.convCols * cmdline.convRows); + pgm_writepgminit(stdout, cols, rows, maxval, 0) ; + +Index: netpbm-11.5.2/converter/other/pnmtoddif.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/pnmtoddif.c ++++ netpbm-11.5.2/converter/other/pnmtoddif.c +@@ -627,6 +627,7 @@ main(int argc, char *argv[]) { + switch (PNM_FORMAT_TYPE(format)) { + case PBM_TYPE: + ip.bits_per_pixel = 1; ++ overflow_add(cols, 7); + ip.bytes_per_line = (cols + 7) / 8; + ip.spectral = 2; + ip.components = 1; +@@ -642,6 +643,7 @@ main(int argc, char *argv[]) { + ip.polarity = 2; + break; + case PPM_TYPE: ++ overflow2(cols, 3); + ip.bytes_per_line = 3 * cols; + ip.bits_per_pixel = 24; + ip.spectral = 5; +Index: netpbm-11.5.2/converter/other/pnmtojpeg.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/pnmtojpeg.c ++++ netpbm-11.5.2/converter/other/pnmtojpeg.c +@@ -1068,6 +1068,7 @@ computeRescalingArray(JSAMPLE ** + JSAMPLE * rescale; + long val; + ++ overflow_add(maxval, 1); + MALLOCARRAY(rescale, maxval + 1); + + if (!rescale) +Index: netpbm-11.5.2/converter/other/pnmtops.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/pnmtops.c ++++ netpbm-11.5.2/converter/other/pnmtops.c +@@ -298,17 +298,21 @@ parseCommandLine(int argc, const char ** + validateCompDimension(width, psScaleFactor, "-width value"); + validateCompDimension(height, psScaleFactor, "-height value"); + ++ overflow2(width, 72); + cmdlineP->width = width * psScaleFactor; ++ overflow2(height, 72); + cmdlineP->height = height * psScaleFactor; + + if (imagewidthSpec) { + validateCompDimension(imagewidth, psScaleFactor, "-imagewidth value"); ++ overflow2(imagewidth, 72); + cmdlineP->imagewidth = imagewidth * psScaleFactor; + } + else + cmdlineP->imagewidth = 0; + if (imageheightSpec) { +- validateCompDimension(imagewidth, psScaleFactor, "-imageheight value"); ++ validateCompDimension(imageheight, psScaleFactor, "-imageheight value"); ++ overflow2(imageheight, 72); + cmdlineP->imageheight = imageheight * psScaleFactor; + } + else +Index: netpbm-11.5.2/converter/other/pnmtorle.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/pnmtorle.c ++++ netpbm-11.5.2/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, + * and the reason for such modification. ++ * ++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox + */ + /* + * pnmtorle - A program which will convert pbmplus (ppm or pgm) images +Index: netpbm-11.5.2/converter/other/pnmtosgi.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/pnmtosgi.c ++++ netpbm-11.5.2/converter/other/pnmtosgi.c +@@ -185,6 +185,7 @@ buildChannels(FILE * const ifP, + ScanElem * temp; + + if (storage != STORAGE_VERBATIM) { ++ overflow2(channels, rows); + MALLOCARRAY_NOFAIL(table, channels * rows); + } else + table = NULL; +Index: netpbm-11.5.2/converter/other/rletopnm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/rletopnm.c ++++ netpbm-11.5.2/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, + * and the reason for such modification. ++ * ++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox + */ + /* + * rletopnm - A conversion program to convert from Utah's "rle" image format +Index: netpbm-11.5.2/converter/other/sgitopnm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/sgitopnm.c ++++ netpbm-11.5.2/converter/other/sgitopnm.c +@@ -377,10 +377,14 @@ readChannels(FILE * const ifP, + MALLOCARRAY_NOFAIL(image, head->ysize); + } else { + maxchannel = 3; ++ overflow2(head->ysize, maxchannel); + MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel); + } +- if (table) ++ if (table) { ++ overflow2(head->xsize, 2); ++ overflow_add(head->xsize*2, 2); + MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize)); ++ } + + for (channel = 0; channel < maxchannel; ++channel) { + unsigned int row; +Index: netpbm-11.5.2/converter/other/tifftopnm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/tifftopnm.c ++++ netpbm-11.5.2/converter/other/tifftopnm.c +@@ -1358,7 +1358,9 @@ convertRasterByRows(pnmOut * const + if (UINT_MAX/cols < spp) + pm_error("Image is too wide/deep (%u x %u) for computations", + cols, spp); +- MALLOCARRAY(samplebuf, cols * spp); ++ /* samplebuf is unsigned int * !!! */ ++ samplebuf = (unsigned int *) malloc3(cols , sizeof(unsigned int) , spp); ++ + if (samplebuf == NULL) + pm_error("can't allocate memory for row buffer"); + +Index: netpbm-11.5.2/converter/other/xwdtopnm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/xwdtopnm.c ++++ netpbm-11.5.2/converter/other/xwdtopnm.c +@@ -224,6 +224,10 @@ processX10Header(X10WDFileHeader * cons + *colorsP = pnm_allocrow(2); + PNM_ASSIGN1((*colorsP)[0], 0); + PNM_ASSIGN1((*colorsP)[1], *maxvalP); ++ overflow_add(h10P->pixmap_width, 15); ++ if(h10P->pixmap_width < 0) ++ pm_error("assert: negative width"); ++ overflow2((((h10P->pixmap_width + 15) / 16) * 16 - h10P->pixmap_width), 8); + *padrightP = + (((h10P->pixmap_width + 15) / 16) * 16 - h10P->pixmap_width) * 8; + *bitsPerItemP = 16; +@@ -673,6 +677,7 @@ processX11Header(const X11WDFileHeader * + "%u bits per pixel, which is too many for this program " + "to compute", + h11FixedP->pixmap_width, h11FixedP->bits_per_pixel); ++ overflow2(h11FixedP->bytes_per_line, 8); + *padrightP = + h11FixedP->bytes_per_line * 8 - + h11FixedP->pixmap_width * h11FixedP->bits_per_pixel; +Index: netpbm-11.5.2/converter/pbm/mdatopbm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/mdatopbm.c ++++ netpbm-11.5.2/converter/pbm/mdatopbm.c +@@ -283,10 +283,13 @@ main(int argc, const char **argv) { + pm_readlittleshort(ifP, &yy); nInCols = yy; + } + ++ overflow2(nOutCols, 8); + nOutCols = 8 * nInCols; + nOutRows = nInRows; +- if (bScale) ++ if (bScale){ ++ overflow2(nOutRows, 2); + nOutRows *= 2; ++ } + + data = pbm_allocarray(nOutCols, nOutRows); + +Index: netpbm-11.5.2/converter/pbm/mgrtopbm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/mgrtopbm.c ++++ netpbm-11.5.2/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; + } + +Index: netpbm-11.5.2/converter/pbm/pbmtogem.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/pbmtogem.c ++++ netpbm-11.5.2/converter/pbm/pbmtogem.c +@@ -79,6 +79,7 @@ putinit (int const rows, int const cols) + bitsperitem = 0; + bitshift = 7; + outcol = 0; ++ overflow_add(cols, 7); + outmax = (cols + 7) / 8; + outrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char)); + lastrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char)); +Index: netpbm-11.5.2/converter/pbm/pbmtogo.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/pbmtogo.c ++++ netpbm-11.5.2/converter/pbm/pbmtogo.c +@@ -158,6 +158,7 @@ main(int argc, + bitrow = pbm_allocrow(cols); + + /* Round cols up to the nearest multiple of 8. */ ++ overflow_add(cols, 7); + rucols = ( cols + 7 ) / 8; + bytesperrow = rucols; /* GraphOn uses bytes */ + rucols = rucols * 8; +Index: netpbm-11.5.2/converter/pbm/pbmtolj.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/pbmtolj.c ++++ netpbm-11.5.2/converter/pbm/pbmtolj.c +@@ -122,7 +122,11 @@ parseCommandLine(int argc, const char ** + static void + allocateBuffers(unsigned int const cols) { + ++ overflow_add(cols, 8); + rowBufferSize = (cols + 7) / 8; ++ overflow_add(rowBufferSize, 128); ++ overflow_add(rowBufferSize, rowBufferSize+128); ++ overflow_add(rowBufferSize+10, rowBufferSize/8); + packBufferSize = rowBufferSize + (rowBufferSize + 127) / 128 + 1; + deltaBufferSize = rowBufferSize + rowBufferSize / 8 + 10; + +Index: netpbm-11.5.2/converter/pbm/pbmtomda.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/pbmtomda.c ++++ netpbm-11.5.2/converter/pbm/pbmtomda.c +@@ -206,6 +206,7 @@ main(int argc, const char ** argv) { + + nOutRowsUnrounded = cmdline.dscale ? nInRows/2 : nInRows; + ++ overflow_add(nOutRowsUnrounded, 3); + nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4; + /* MDA wants rows a multiple of 4 */ + nOutCols = nInCols / 8; +Index: netpbm-11.5.2/converter/pbm/pbmtoppa/pbm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/pbmtoppa/pbm.c ++++ netpbm-11.5.2/converter/pbm/pbmtoppa/pbm.c +@@ -157,6 +157,7 @@ pbm_readline(pbm_stat * const pbmSt + break; + case P4: { + int tmp, tmp2; ++ overflow_add(pbmStatP->width, 7); + tmp = (pbmStatP->width+7)/8; + tmp2 = fread(data,1,tmp,pbmStatP->fptr); + if (tmp2 == tmp) { +@@ -189,6 +190,7 @@ pbm_unreadline(pbm_stat * const pbmStatP + + if (!pbmStatP->unread) { + pbmStatP->unread = 1; ++ overflow_add(pbmStatP->width, 7); + pbmStatP->revdata = malloc ((pbmStatP->width+7)/8); + memcpy(pbmStatP->revdata, data, (pbmStatP->width+7)/8); + --pbmStatP->current_line; +Index: netpbm-11.5.2/converter/pbm/pbmtoppa/pbmtoppa.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/pbmtoppa/pbmtoppa.c ++++ netpbm-11.5.2/converter/pbm/pbmtoppa/pbmtoppa.c +@@ -456,6 +456,7 @@ main(int argc, char *argv[]) { + pm_error("main(): unrecognized parameter '%s'", argv[argn]); + } + ++ overflow_add(Width, 7); + Pwidth = (Width+7)/8; + printer.fptr = ofP; + +Index: netpbm-11.5.2/converter/pbm/thinkjettopbm.l +=================================================================== +--- netpbm-11.5.2.orig/converter/pbm/thinkjettopbm.l ++++ netpbm-11.5.2/converter/pbm/thinkjettopbm.l +@@ -115,8 +115,10 @@ DIG [0-9] + \033\*b{DIG}+W { + int l; + if (rowCount >= rowCapacity) { ++ overflow_add(rowCapacity, 100); + if (rowCapacity > INT_MAX-100) + pm_error("Too many rows to count"); ++ overflow2(rowCapacity, sizeof *rows); + rowCapacity += 100; + REALLOCARRAY(rows, rowCapacity); + if (rows == NULL) +@@ -232,6 +234,8 @@ yywrap (void) + /* + * Quite simple since ThinkJet bit arrangement matches PBM + */ ++ ++ overflow2(maxRowLength, 8); + pbm_writepbminit(stdout, maxRowLength*8, rowCount, 0); + + packed_bitrow = malloc(maxRowLength); +Index: netpbm-11.5.2/converter/pgm/lispmtopgm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pgm/lispmtopgm.c ++++ netpbm-11.5.2/converter/pgm/lispmtopgm.c +@@ -167,6 +167,7 @@ main(int argc, const char ** argv) { + + pgm_writepgminit(stdout, cols, rows, maxval, 0); + ++ overflow_add(cols, 7); + grayrow = pgm_allocrow(ROUNDUP(cols, 8)); + + for (row = 0; row < rows; ++row) { +Index: netpbm-11.5.2/converter/pgm/psidtopgm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/pgm/psidtopgm.c ++++ netpbm-11.5.2/converter/pgm/psidtopgm.c +@@ -81,6 +81,7 @@ main(int argc, + + pgm_writepgminit(stdout, cols, rows, maxval, 0); + ++ overflow_add(cols, 7); + grayrow = pgm_allocrow(ROUNDUP(cols, 8)); + + for (row = 0; row < rows; ++row) { +Index: netpbm-11.5.2/converter/ppm/ilbmtoppm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ilbmtoppm.c ++++ netpbm-11.5.2/converter/ppm/ilbmtoppm.c +@@ -617,6 +617,7 @@ decodeRow(FILE * const ifP, + rawtype * chP; + + cols = bmhdP->w; ++ overflow_add(cols, 15); + bytes = ilbm_rowByteCt(cols); + + for (plane = 0; plane < nPlanes; ++plane) { +@@ -711,6 +712,23 @@ decodeMask(FILE * const ifP, + Multipalette handling + ****************************************************************************/ + ++static void * ++xmalloc2(x, y) ++ int x; ++ int y; ++{ ++ void *mem; ++ ++ overflow2(x,y); ++ if( x * y == 0 ) ++ return NULL; ++ ++ mem = malloc2(x,y); ++ if( mem == NULL ) ++ pm_error("out of memory allocating %d bytes", x * y); ++ return mem; ++} ++ + + static void + multi_adjust(ColorMap * const cmapP, +Index: netpbm-11.5.2/converter/ppm/imgtoppm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/imgtoppm.c ++++ netpbm-11.5.2/converter/ppm/imgtoppm.c +@@ -85,6 +85,7 @@ main(int argc, const char ** argv) { + len = atoi((char*) buf); + if (fread(buf, len, 1, ifP) != 1) + pm_error("bad colormap buf"); ++ overflow2(cmaplen, 3); + if (len != cmaplen * 3) { + pm_message( + "cmaplen (%u) and colormap buf length (%u) do not match", +@@ -105,6 +106,7 @@ main(int argc, const char ** argv) { + pm_error("bad pixel data header"); + buf[8] = '\0'; + len = atoi((char*) buf); ++ overflow2(cols, rows); + if (len != cols * rows) + pm_message( + "pixel data length (%u) does not match image size (%u)", +Index: netpbm-11.5.2/converter/ppm/Makefile +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/Makefile ++++ netpbm-11.5.2/converter/ppm/Makefile +@@ -11,7 +11,7 @@ SUBDIRS = hpcdtoppm ppmtompeg + + PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \ + leaftoppm mtvtoppm neotoppm \ +- pcxtoppm pc1toppm pi1toppm picttoppm pjtoppm \ ++ pcxtoppm pc1toppm pi1toppm pjtoppm \ + ppmtoacad ppmtoapplevol ppmtoarbtxt ppmtoascii \ + ppmtobmp ppmtoeyuv ppmtogif ppmtoicr ppmtoilbm \ + ppmtoleaf ppmtolj ppmtomitsu ppmtoneo \ +Index: netpbm-11.5.2/converter/ppm/pcxtoppm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/pcxtoppm.c ++++ netpbm-11.5.2/converter/ppm/pcxtoppm.c +@@ -375,6 +375,7 @@ pcxPlanesToPixels(unsigned char * const + pm_error("can't handle more than 1 bit per pixel"); + + /* Clear the pixel buffer - initial value */ ++ overflow2(bytesPerLine, 8); + for (i = 0; i < npixels; ++i) + pixels[i] = 0; + +@@ -452,6 +453,7 @@ pcx16ColToPpm(FILE * const ifP, + bytesPerLine); + + /* bytesPerLine should be >= bBitsPerPixel * cols / 8 */ ++ overflow2(bytesPerLine, 8); + rawcols = bytesPerLine * 8 / bitsPerPixel; + + if (headerCols > rawcols) { +Index: netpbm-11.5.2/converter/ppm/picttoppm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/picttoppm.c ++++ netpbm-11.5.2/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-11.5.2/converter/ppm/ppmtoeyuv.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtoeyuv.c ++++ netpbm-11.5.2/converter/ppm/ppmtoeyuv.c +@@ -117,6 +117,7 @@ chrominanceBlue(pixel const p) { + static void + createMultiplicationTables(pixval const maxval) { + ++ overflow_add(maxval, 1); + MALLOCARRAY_NOFAIL(mult299 , maxval+1); + MALLOCARRAY_NOFAIL(mult587 , maxval+1); + MALLOCARRAY_NOFAIL(mult114 , maxval+1); +Index: netpbm-11.5.2/converter/ppm/ppmtoilbm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtoilbm.c ++++ netpbm-11.5.2/converter/ppm/ppmtoilbm.c +@@ -188,6 +188,7 @@ makeValTable(int const oldmaxval, + unsigned int i; + int * table; + ++ overflow_add(oldmaxval, 1); + MALLOCARRAY_NOFAIL(table, oldmaxval + 1); + for (i = 0; i <= oldmaxval; ++i) + table[i] = ROUNDDIV(i * newmaxval, oldmaxval); +@@ -1626,6 +1627,7 @@ ppmToRgb8(FILE * const ifP, + + maskmethod = 0; /* no masking - RGB8 uses genlock bits */ + compmethod = 4; /* RGB8 files are always compressed */ ++ overflow2(cols, 4); + MALLOCARRAY_NOFAIL(compr_row, cols * 4); + + if( maxval != 255 ) { +@@ -1717,6 +1719,7 @@ ppmToRgbn(FILE * const ifP, + + maskmethod = 0; /* no masking - RGBN uses genlock bits */ + compmethod = 4; /* RGBN files are always compressed */ ++ overflow2(cols, 2); + MALLOCARRAY_NOFAIL(compr_row, cols * 2); + + if( maxval != 15 ) { +@@ -2278,10 +2281,12 @@ main(int argc, char ** argv) { + MALLOCARRAY_NOFAIL(coded_rowbuf, ilbm_rowByteCt(cols)); + for (i = 0; i < ilbm_rowByteCt(cols); ++i) + coded_rowbuf[i] = 0; +- if (DO_COMPRESS) ++ if (DO_COMPRESS) { ++ overflow_add(cols,15); + pm_rlenc_allocoutbuf(&compr_rowbuf, + ilbm_rowByteCt(cols), + PM_RLE_PACKBITS); ++ } + } + + switch (mode) { +Index: netpbm-11.5.2/converter/ppm/ppmtolj.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtolj.c ++++ netpbm-11.5.2/converter/ppm/ppmtolj.c +@@ -212,6 +212,7 @@ printRaster(FILE * const ifP, + pm_error("Image is uncomputably wide (%u columns)", cols); + } + ++ overflow2(cols, 6); + obuf = (unsigned char *) pm_allocrow(cols * 3, sizeof(unsigned char)); + cbuf = (unsigned char *) pm_allocrow(cols * 6, sizeof(unsigned char)); + +Index: netpbm-11.5.2/converter/ppm/ppmtomitsu.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtomitsu.c ++++ netpbm-11.5.2/converter/ppm/ppmtomitsu.c +@@ -68,6 +68,8 @@ mediaSize(const char * const media, + medias = MSize_User; + + if (dpi300) { ++ overflow2(medias.maxcols, 2); ++ overflow2(medias.maxrows, 2); + medias.maxcols *= 2; + medias.maxrows *= 2; + } +Index: netpbm-11.5.2/converter/ppm/ppmtopcx.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtopcx.c ++++ netpbm-11.5.2/converter/ppm/ppmtopcx.c +@@ -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(planesrow, bytesPerLine); + +Index: netpbm-11.5.2/converter/ppm/ppmtopjxl.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtopjxl.c ++++ netpbm-11.5.2/converter/ppm/ppmtopjxl.c +@@ -535,6 +535,8 @@ main(int argc, const char * argv[]) { + pm_error("image too large; reduce with ppmscale"); + if (maxval > PCL_MAXVAL) + pm_error("color range too large; reduce with ppmcscale"); ++ if (cols < 0 || rows < 0) ++ pm_error("negative size is not possible"); + + computeColormap(pixels, cols, rows, MAXCOLORS, &chv, &cht, &colorCt); + +Index: netpbm-11.5.2/converter/ppm/ppmtowinicon.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtowinicon.c ++++ netpbm-11.5.2/converter/ppm/ppmtowinicon.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "pm_c_util.h" + #include "winico.h" +@@ -208,6 +209,7 @@ newAndBitmap(gray ** const ba, + MALLOCARRAY_NOFAIL(rowData, rows); + icBitmapP->xBytes = xByteCt; + icBitmapP->data = rowData; ++ overflow2(xByteCt, rows); + icBitmapP->size = xByteCt * rows; + for (row = 0; row < rows; ++row) { + u1 * thisRow; /* malloc'ed */ +@@ -410,6 +412,7 @@ newBitmap(unsigned int const bpp, + + icBitmapP->xBytes = xByteCt; + icBitmapP->data = rowData; ++ overflow2(xByteCt, rows); + icBitmapP->size = xByteCt * rows; + + unsigned int const assumedBpp = (pa == NULL) ? 1 : bpp; +@@ -700,6 +703,10 @@ addEntryToIcon(MS_Ico * const MSIcon + /* all the icons I looked at ignored this value */ + entryP->ih = newInfoHeader(*entryP); + entryP->colors = paletteP->colors; ++ overflow2(4, entryP->color_count); ++ overflow_add(xorBitmapP->size, andBitmapP->size); ++ overflow_add(xorBitmapP->size + andBitmapP->size, 40); ++ overflow_add(xorBitmapP->size + andBitmapP->size + 40, 4 * entryP->color_count); + entryP->size_in_bytes = + xorBitmapP->size + andBitmapP->size + 40 + (4 * entryCols); + if (verbose) +Index: netpbm-11.5.2/converter/ppm/ppmtoxpm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/ppmtoxpm.c ++++ netpbm-11.5.2/converter/ppm/ppmtoxpm.c +@@ -195,6 +195,7 @@ numstr(unsigned int const input, + unsigned int i; + + /* Allocate memory for printed number. Abort if error. */ ++ overflow_add(digitCt, 1); + MALLOCARRAY_NOFAIL(str, digitCt + 1); + + i = input; /* initial value */ +@@ -310,6 +311,7 @@ genCmap(colorhist_vector const chv, + unsigned int charsPerPixel; + unsigned int xpmMaxval; + ++ if (includeTransparent) overflow_add(ncolors, 1); + MALLOCARRAY(cmap, cmapSize); + if (cmapP == NULL) + pm_error("Can't get memory for a %u-entry color map", cmapSize); +Index: netpbm-11.5.2/converter/ppm/qrttoppm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/qrttoppm.c ++++ netpbm-11.5.2/converter/ppm/qrttoppm.c +@@ -51,6 +51,7 @@ main(int argc, const char ** argv) { + + pixelrow = ppm_allocrow(cols); + ++ overflow2(3, cols); + MALLOCARRAY(buf, 3 * cols); + + if (!buf) +Index: netpbm-11.5.2/converter/ppm/sldtoppm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/ppm/sldtoppm.c ++++ netpbm-11.5.2/converter/ppm/sldtoppm.c +@@ -542,6 +542,8 @@ slider(slvecfn slvec, + + /* Allocate image buffer and clear it to black. */ + ++ overflow_add(ixdots,1); ++ overflow_add(iydots,1); + pixcols = ixdots + 1; + pixrows = iydots + 1; + pixels = ppm_allocarray(pixcols, pixrows); +Index: netpbm-11.5.2/editor/pamcut.c +=================================================================== +--- netpbm-11.5.2.orig/editor/pamcut.c ++++ netpbm-11.5.2/editor/pamcut.c +@@ -799,6 +799,8 @@ cutOneImage(FILE * const ifP + + outpam = inpam; /* Initial value -- most fields should be same */ + outpam.file = ofP; ++ overflow_add(rightcol, 1); ++ overflow_add(bottomrow, 1); + outpam.width = rightcol - leftcol + 1; + outpam.height = bottomrow - toprow + 1; + +Index: netpbm-11.5.2/editor/pbmreduce.c +=================================================================== +--- netpbm-11.5.2.orig/editor/pbmreduce.c ++++ netpbm-11.5.2/editor/pbmreduce.c +@@ -153,6 +153,7 @@ initializeFloydSteinberg(struct FS * co + unsigned int col; + struct pm_randSt randSt; + ++ overflow_add(newcols, 2); + MALLOCARRAY(fsP->thiserr, newcols + 2); + MALLOCARRAY(fsP->nexterr, newcols + 2); + +Index: netpbm-11.5.2/editor/pnmgamma.c +=================================================================== +--- netpbm-11.5.2.orig/editor/pnmgamma.c ++++ netpbm-11.5.2/editor/pnmgamma.c +@@ -596,6 +596,7 @@ createGammaTables(enum transferFunction + xelval ** const btableP) { + + /* Allocate space for the tables. */ ++ overflow_add(maxval, 1); + MALLOCARRAY(*rtableP, maxval+1); + MALLOCARRAY(*gtableP, maxval+1); + MALLOCARRAY(*btableP, maxval+1); +Index: netpbm-11.5.2/editor/pnmhisteq.c +=================================================================== +--- netpbm-11.5.2.orig/editor/pnmhisteq.c ++++ netpbm-11.5.2/editor/pnmhisteq.c +@@ -106,6 +106,7 @@ computeLuminosityHistogram(xel * const * + unsigned int pixelCount; + unsigned int * lumahist; + ++ overflow_add(maxval, 1); + MALLOCARRAY(lumahist, maxval + 1); + if (lumahist == NULL) + pm_error("Out of storage allocating array for %u histogram elements", +Index: netpbm-11.5.2/editor/pnmpad.c +=================================================================== +--- netpbm-11.5.2.orig/editor/pnmpad.c ++++ netpbm-11.5.2/editor/pnmpad.c +@@ -1127,6 +1127,8 @@ main(int argc, const char ** argv) { + + computePadSizes(cmdline, cols, rows, &lpad, &rpad, &tpad, &bpad); + ++ overflow_add(cols, lpad); ++ overflow_add(cols + lpad, rpad); + newcols = cols + lpad + rpad; + + if (cmdline.reportonly) +Index: netpbm-11.5.2/editor/pnmremap.c +=================================================================== +--- netpbm-11.5.2.orig/editor/pnmremap.c ++++ netpbm-11.5.2/editor/pnmremap.c +@@ -469,6 +469,7 @@ fserr_init(struct pam * const pamP, + unsigned int plane; + + unsigned int const fserrSz = pamP->width + 2; ++ overflow_add(pamP->width, 2); + + fserrP->width = pamP->width; + +@@ -508,6 +509,7 @@ floydInitRow(struct pam * const pamP, + + unsigned int col; + ++ overflow_add(pamP->width, 2); + for (col = 0; col < pamP->width + 2; ++col) { + unsigned int plane; + for (plane = 0; plane < pamP->depth; ++plane) +Index: netpbm-11.5.2/editor/pnmshear.c +=================================================================== +--- netpbm-11.5.2.orig/editor/pnmshear.c ++++ netpbm-11.5.2/editor/pnmshear.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include "pm_c_util.h" + #include "mallocvar.h" +@@ -235,6 +236,11 @@ main(int argc, const char * argv[]) { + + shearfac = tan(cmdline.angle); + ++ if(rows * shearfac >= INT_MAX-1) ++ pm_error("image too large"); ++ ++ overflow_add(rows * shearfac, cols+1); ++ + newcolsD = (double) rows * fabs(shearfac) + cols + 0.999999; + if (newcolsD > INT_MAX-2) + pm_error("angle is too close to +/-90 degrees; " +Index: netpbm-11.5.2/editor/specialty/pamoil.c +=================================================================== +--- netpbm-11.5.2.orig/editor/specialty/pamoil.c ++++ netpbm-11.5.2/editor/specialty/pamoil.c +@@ -185,6 +185,7 @@ main(int argc, const char ** argv) { + + tuples = pnm_readpam(ifP, &inpam, PAM_STRUCT_SIZE(tuple_type)); + ++ overflow_add(inpam.maxval, 1); + MALLOCARRAY(hist, inpam.maxval + 1); + if (hist == NULL) + pm_error("Unable to allocate memory for histogram."); +Index: netpbm-11.5.2/generator/pbmtext.c +=================================================================== +--- netpbm-11.5.2.orig/generator/pbmtext.c ++++ netpbm-11.5.2/generator/pbmtext.c +@@ -1193,6 +1193,7 @@ computeMargins(struct CmdlineInfo const + *hmarginP = fontP->maxwidth; + } else { + *vmarginP = fontP->maxheight; ++ overflow2(2, fontP->maxwidth); + *hmarginP = 2 * fontP->maxwidth; + } + } +Index: netpbm-11.5.2/generator/pgmkernel.c +=================================================================== +--- netpbm-11.5.2.orig/generator/pgmkernel.c ++++ netpbm-11.5.2/generator/pgmkernel.c +@@ -224,6 +224,7 @@ main(int argc, const char * argv[]) { + + /* Output matrix is symmetric vertically and horizontally. */ + ++ overflow_add(cmdline.rows, 1); + arows = (cmdline.rows + 1) / 2; + /* Half the number of rows. Add 1 if odd. */ + halfKernel = pgm_allocarray(cmdline.cols, arows); +Index: netpbm-11.5.2/lib/libpammap.c +=================================================================== +--- netpbm-11.5.2.orig/lib/libpammap.c ++++ netpbm-11.5.2/lib/libpammap.c +@@ -111,6 +111,8 @@ allocTupleIntListItem(struct pam * const + if (pamP->depth > (UINT_MAX - sizeof(*retval)) / sizeof(sample)) + pm_error("Depth %u is too large for computation", pamP->depth); + ++ 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) + + pamP->depth * sizeof(sample); +Index: netpbm-11.5.2/lib/libpbm1.c +=================================================================== +--- netpbm-11.5.2.orig/lib/libpbm1.c ++++ netpbm-11.5.2/lib/libpbm1.c +@@ -80,6 +80,7 @@ pbm_check(FILE * const fil + } else { + pm_filepos const bytesPerRow = (cols+7)/8; + pm_filepos const needRasterSize = rows * bytesPerRow; ++ overflow2(bytesPerRow, rows); + pm_check(fileP, checkType, needRasterSize, retvalP); + } + } +Index: netpbm-11.5.2/lib/libpm.c +=================================================================== +--- netpbm-11.5.2.orig/lib/libpm.c ++++ netpbm-11.5.2/lib/libpm.c +@@ -904,6 +904,55 @@ pm_parse_height(const char * const arg) + return height; + } + ++/* ++ * Maths wrapping ++ */ ++ ++void __overflow2(int a, int b) ++{ ++ if(a < 0 || b < 0) ++ pm_error("object too large"); ++ if(b == 0) ++ return; ++ if(a > INT_MAX / b) ++ pm_error("object too large"); ++} ++ ++void overflow3(int a, int b, int c) ++{ ++ overflow2(a,b); ++ overflow2(a*b, c); ++} ++ ++void overflow_add(int a, int b) ++{ ++ if( a > INT_MAX - b) ++ pm_error("object too large"); ++} ++ ++void *malloc2(int a, int b) ++{ ++ overflow2(a, b); ++ if(a*b == 0) ++ pm_error("Zero byte allocation"); ++ return malloc(a*b); ++} ++ ++void *malloc3(int a, int b, int c) ++{ ++ overflow3(a, b, c); ++ if(a*b*c == 0) ++ pm_error("Zero byte allocation"); ++ return malloc(a*b*c); ++} ++ ++void *realloc2(void * a, int b, int c) ++{ ++ overflow2(b, c); ++ if(b*c == 0) ++ pm_error("Zero byte allocation"); ++ return realloc(a, b*c); ++} + + + unsigned int +Index: netpbm-11.5.2/lib/pm.h +=================================================================== +--- netpbm-11.5.2.orig/lib/pm.h ++++ netpbm-11.5.2/lib/pm.h +@@ -466,4 +466,11 @@ pm_parse_maxval(const char * const arg); + #endif + + ++void *malloc2(int, int); ++void *malloc3(int, int, int); ++#define overflow2(a,b) __overflow2(a,b) ++void __overflow2(int, int); ++void overflow3(int, int, int); ++void overflow_add(int, int); ++ + #endif +Index: netpbm-11.5.2/other/pnmcolormap.c +=================================================================== +--- netpbm-11.5.2.orig/other/pnmcolormap.c ++++ netpbm-11.5.2/other/pnmcolormap.c +@@ -1134,6 +1134,7 @@ colormapToSquare(struct pam * const pamP + pamP->width = intsqrt; + else + pamP->width = intsqrt + 1; ++ overflow_add(intsqrt, 1); + } + { + unsigned int const intQuotient = colormap.size / pamP->width; +Index: netpbm-11.5.2/urt/rle_addhist.c +=================================================================== +--- netpbm-11.5.2.orig/urt/rle_addhist.c ++++ netpbm-11.5.2/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, + * and the reason for such modification. ++ * ++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox + */ + /* + * rle_addhist.c - Add to the HISTORY comment in header +@@ -58,14 +60,21 @@ newCommentLen(const char * const histoi + } + + /* Add length of date and time in ASCII. */ ++ overflow_add(length, strlen(timedate)); + length += strlen(timedate); + + /* Add length of padding, "on ", and length of history name plus "="*/ ++ overflow_add(strlen(padding), 4); ++ overflow_add(strlen(histoire), strlen(padding) + 4); ++ overflow_add(length, strlen(histoire) + strlen(padding) + 4); + length += strlen(padding) + 3 + strlen(histoire) + 1; + +- if (old && *old) ++ if (old && *old) { ++ overflow_add(length, strlen(old)); + length += strlen(old); /* add length if there. */ ++ } + ++ overflow_add(length, 1); + ++length; /* Add size of terminating NUL. */ + + return length; +Index: netpbm-11.5.2/urt/rle_getrow.c +=================================================================== +--- netpbm-11.5.2.orig/urt/rle_getrow.c ++++ netpbm-11.5.2/urt/rle_getrow.c +@@ -17,6 +17,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 + */ + /* + * rle_getrow.c - Read an RLE file in. +@@ -73,6 +75,7 @@ readComments(rle_hdr * const hdrP) { + char * commentHeap; + unsigned int i; + ++ overflow_add(comlen, 1); + MALLOCARRAY(commentHeap, evenlen); + + if (commentHeap == NULL) { +Index: netpbm-11.5.2/urt/rle_hdr.c +=================================================================== +--- netpbm-11.5.2.orig/urt/rle_hdr.c ++++ netpbm-11.5.2/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, + * and the reason for such modification. ++ * ++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox + */ + /* + * rle_hdr.c - Functions to manipulate rle_hdr structures. +@@ -148,7 +150,7 @@ rle_hdr_cp(rle_hdr * const fromHdrP, + if (toHdrP->cmap) { + size_t const size = + toHdrP->ncmap * (1 << toHdrP->cmaplen) * sizeof(rle_map); +- toHdrP->cmap = malloc(size); ++ toHdrP->cmap = (rle_map *)malloc3( toHdrP->ncmap, 1<cmaplen, sizeof(rle_map)); + if (!toHdrP->cmap) + pm_error("Failed to allocate memory for %u color maps " + "of length %u", toHdrP->ncmap, 1 << toHdrP->cmaplen); +@@ -164,11 +166,16 @@ rle_hdr_cp(rle_hdr * const fromHdrP, + + /* Count the comments. */ + for (cp = toHdrP->comments, size = 0; *cp; ++cp) ++ { ++ overflow_add(size, 1); + ++size; ++ } + + /* Check if there are really any comments. */ + if (size > 0) { ++ overflow_add(size, 1); + ++size; /* Copy the NULL pointer, too. */ ++ overflow2(size, sizeof(char *)); + size *= sizeof(char *); + toHdrP->comments = malloc(size); + if (!toHdrP->comments) +Index: netpbm-11.5.2/urt/rle.h +=================================================================== +--- netpbm-11.5.2.orig/urt/rle.h ++++ netpbm-11.5.2/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, + * and the reason for such modification. ++ * ++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox ++ * Header declarations needed + */ + /* + * rle.h - Global declarations for Utah Raster Toolkit RLE programs. +@@ -152,6 +155,17 @@ rle_hdr /* End of typedef. * + */ + 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); ++extern void overflow3(int, int, int); ++extern void *malloc2(int, int); ++extern void *malloc3(int, int, int); ++extern void *realloc2(void *, int, int); + + /* Declare RLE library routines. */ + +Index: netpbm-11.5.2/urt/rle_open_f.c +=================================================================== +--- netpbm-11.5.2.orig/urt/rle_open_f.c ++++ netpbm-11.5.2/urt/rle_open_f.c +@@ -163,65 +163,7 @@ dealWithSubprocess(const char * const f + FILE ** const fpP, + bool * const noSubprocessP, + const char ** const errorP) { +- +-#ifdef NO_OPEN_PIPES + *noSubprocessP = TRUE; +-#else +- const char *cp; +- +- reapChildren(catchingChildrenP, pids); +- +- /* 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] == '|') { +- pid_t thepid; /* PID from my_popen */ +- +- *noSubprocessP = FALSE; +- +- *fpP = my_popen(file_name + 1, mode, &thepid); +- if (*fpP == NULL) +- *errorP = "%s: can't invoke <<%s>> for %s: "; +- else { +- /* One more child to catch, eventually. */ +- if (*catchingChildrenP < MAX_CHILDREN) +- pids[(*catchingChildrenP)++] = thepid; +- } +- } else if (cp > file_name && *cp == '.' && *(cp + 1) == 'Z' ) { +- /* Compress case. */ +- pid_t thepid; /* PID from my_popen. */ +- 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) +- *errorP = "%s: can't invoke 'compress' program, " +- "trying to open %s for %s"; +- else { +- /* One more child to catch, eventually. */ +- if (*catchingChildrenP < MAX_CHILDREN) +- pids[(*catchingChildrenP)++] = thepid; +- } +- pm_strfree(command); +- } else { +- *noSubprocessP = TRUE; +- *errorP = NULL; +- } +-#endif + } + + +Index: netpbm-11.5.2/urt/rle_putcom.c +=================================================================== +--- netpbm-11.5.2.orig/urt/rle_putcom.c ++++ netpbm-11.5.2/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, + * and the reason for such modification. ++ * ++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox + */ + /* + * rle_putcom.c - Add a picture comment to the header struct. +Index: netpbm-11.5.2/urt/Runput.c +=================================================================== +--- netpbm-11.5.2.orig/urt/Runput.c ++++ netpbm-11.5.2/urt/Runput.c +@@ -17,6 +17,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 + */ + /* + * Runput.c - General purpose Run Length Encoding. +@@ -235,7 +237,7 @@ RunSetup(rle_hdr * const hdrP) { + rle_pixel * background; + int * bg_color; + +- assert(hdrP->ncolors < UINT_MAX); ++ overflow_add(hdrP->ncolors,1); + + MALLOCARRAY_NOFAIL(background, hdrP->ncolors + 1); + +@@ -262,7 +264,7 @@ RunSetup(rle_hdr * const hdrP) { + unsigned char * h_cmap; + unsigned int i; + +- MALLOCARRAY(h_cmap, nmap * 2); ++ h_cmap = (char *)malloc2( nmap, 2 ); + + if (!h_cmap) { + pm_error("Failed to allocate memory for color map of size %u, " +Index: netpbm-11.5.2/lib/libpam.c +=================================================================== +--- netpbm-11.5.2.orig/lib/libpam.c ++++ netpbm-11.5.2/lib/libpam.c +@@ -258,7 +258,8 @@ allocPamRow(const struct pam * const pam + unsigned int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample); + tuple * tuplerow; + +- tuplerow = malloc(pamP->width * (sizeof(tuple *) + bytesPerTuple)); ++ overflow_add(sizeof(tuple *), bytesPerTuple); ++ tuplerow = malloc2(pamP->width, (sizeof(tuple *) + bytesPerTuple)); + + if (tuplerow != NULL) { + /* Now we initialize the pointers to the individual tuples diff --git a/netpbm-security-scripts.patch b/netpbm-security-scripts.patch new file mode 100644 index 0000000..1059d6c --- /dev/null +++ b/netpbm-security-scripts.patch @@ -0,0 +1,18 @@ +Index: netpbm-11.2.0/editor/ppmshadow +=================================================================== +--- netpbm-11.2.0.orig/editor/ppmshadow ++++ netpbm-11.2.0/editor/ppmshadow +@@ -194,9 +194,10 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp"; + my $ourtmp; + + if ($keeptemp) { +- $ourtmp = "$tmpdir/ppmshadow$$"; +- mkdir($ourtmp, 0777) or +- die("Unable to create directory for temporary files '$ourtmp"); ++ chomp($ourtmp = `mktemp -d -t PPMshadow.XXXXXX`); ++ if ($? >> 8) { ++ die "Can't create directory for temporary files"; ++ } + } else { + $ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", CLEANUP=>1); + } diff --git a/netpbm-use-byrow-when-needed.patch b/netpbm-use-byrow-when-needed.patch new file mode 100644 index 0000000..b0eadd0 --- /dev/null +++ b/netpbm-use-byrow-when-needed.patch @@ -0,0 +1,77 @@ +Index: netpbm-11.5.2/converter/other/tifftopnm.c +=================================================================== +--- netpbm-11.5.2.orig/converter/other/tifftopnm.c ++++ netpbm-11.5.2/converter/other/tifftopnm.c +@@ -1393,7 +1393,7 @@ convertRasterByRows(pnmOut * const + + + +-static void ++static int + warnBrokenTiffLibrary(TIFF * const tiffP) { + + /* TIFF library bug: +@@ -1423,6 +1423,7 @@ warnBrokenTiffLibrary(TIFF * const tiffP + + unsigned short tiffOrientation; + int fldPresent; ++ int broken = false; + fldPresent = TIFFGetField(tiffP, TIFFTAG_ORIENTATION, &tiffOrientation); + if (fldPresent) { + switch (tiffOrientation) { +@@ -1432,10 +1433,12 @@ warnBrokenTiffLibrary(TIFF * const tiffP + case ORIENTATION_LEFTBOT: + pm_message("WARNING: This TIFF image has an orientation that " + "most TIFF libraries convert incorrectly. " +- "Use -byrow to circumvent."); ++ "Using -byrow to circumvent."); ++ broken = true; + break; + } + } ++ return broken; + } + + +@@ -1562,8 +1565,6 @@ convertRasterInMemory(pnmOut * + if (verbose) + pm_message("Converting in memory ..."); + +- warnBrokenTiffLibrary(tif); +- + ok = TIFFRGBAImageOK(tif, emsg); + if (!ok) { + pm_message("%s", emsg); +@@ -1662,7 +1663,7 @@ convertImage(TIFF * const ti + xelval maxval; + xel colormap[MAXCOLORS]; + unsigned short fillorder; +- bool flipOk, noflipOk; ++ bool flipOk, noflipOk, byrow; + pnmOut pnmOut; + + readDirectory(tifP, cmdline.headerdump, &tiffDir); +@@ -1674,15 +1675,21 @@ convertImage(TIFF * const ti + + pm_message("writing %s file", pnm_formattypenm(format)); + ++ byrow = cmdline.byrow; ++ if (warnBrokenTiffLibrary(tifP)) { ++ /* force byrow true: http://bugzilla.maptools.org/show_bug.cgi?id=2654#c9 */ ++ byrow = true; ++ } ++ + pnmOut_init(imageoutFileP, alphaFileP, tiffDir.width, tiffDir.height, + tiffDir.orientation, maxval, format, maxval, +- cmdline.byrow, cmdline.orientraw, ++ byrow, cmdline.orientraw, + cmdline.verbose, + &flipOk, &noflipOk, + &pnmOut); + + convertRaster(&pnmOut, tifP, tiffDir, maxval, +- fillorder, colormap, cmdline.byrow, flipOk, noflipOk, ++ fillorder, colormap, byrow, flipOk, noflipOk, + cmdline.verbose); + + pnmOut_term(&pnmOut, cmdline.verbose); diff --git a/netpbm.changes b/netpbm.changes new file mode 100644 index 0000000..ce8f5e7 --- /dev/null +++ b/netpbm.changes @@ -0,0 +1,1578 @@ +------------------------------------------------------------------- +Fri Feb 2 14:11:02 UTC 2024 - pgajdos@suse.com + +- added patches + fix CVE-2017-5849 [bsc#1022790], CVE-2017-5849 [bsc#1022791] + + netpbm-use-byrow-when-needed.patch + +------------------------------------------------------------------- +Wed Jan 31 14:59:08 UTC 2024 - pgajdos@suse.com + +- version update to 11.5.2 + Release 11.05.02 + + ppmtowinicon: fix array overrun with 4 and 8 bits per pixel. + Release 11.05.01 + Fix typo in ppmforge test case. + Release 11.05.00 + + pnmpad: Add -color, -promote, -extend-edge, -detect-background . + + pnmconvol: Restore ability of convolution matrix to be a + pseudo-plain-PNM with samples that exceed the maxval. Lost in + 10.30 (October 2005) because maxval-checking code was added to + libnetpbm. (Was fixed in 10.47.08 in November 2010, but only in + the 10.47 series). + + pnmindex: Improve failure mode when -size or -across is zero. + + pnmindex: Make -plain work. + + pnmpad: fix behavior with -left, -right, and -width together or + -top, -bottom, -height together: ignores -width where it should + fail. Broken in Netpbm 10.72 (September 2015). + + pamtosvg: fix "zero determinant" failure. Introduced in + Netpbm 11.04 (September 2023). + + pjtoppm: fix crash based on uninitialized variable. + Introduced in Netpbm 11.04 (September 2023). + + ppmtopcxl: fix incorrect output with > 256 colors. Always + broken. (Program was added in primordial Netpbm in 1990). + + pbmtext: fix buffer overrun with insanely large input. + + picttoppm: fix buffer overrun with insanely wide input. + + ppmtoxpm: fix incorrect output with insanely large number of + colors. + + pnmscalefixed: fix incorrect output with really big image and + -pixels option. + + ppmdither: fix buffer overrun with insanely large dithering + matrix. + + pnmpad: no longer accept old-style options (e.g. -t50). + + libnetpbm: Add pm_feed_from_file, pm_accept_to_files, + pm_accept_to_filestream Standard Input feeder, Output accepter + for pm_system. + + libnetpbm, programs that use color maps: fix buffer overrun + with insanely deep images. + + merge build: Fix 'pnmcat'. Introduced in Netpbm 11.00 + (September 2023). + Release 11.04.00 + + pamaddnoise: add -salt. + + pamaddnoise: reject options that aren't meaningful for the type + of noise specified rather than just ignore them. + + ppmtosixel: Add -7bit, so it works on more terminals, including + xterms. Thanks Scott Pakin. + + g3topbm: Add -correctlong + + pnmtojpeg: minor improvement to error messages about bad files. + + pammixmulti: Remove disclaimer of patent license. + + pamstack: Fix bug: acts like -firstmaxval specified when it + wasn't. Introduced in Netpbm 11.03 (June 2023). + + pamstack: Fix -lcmmaxval: chooses wrong maxval. Always + broken (-lcmmaxval was new in Netpbm 11.03 (June 2023)). + + pamstack: Fail gracefully when total number of planes is too + large for unsigned integer. Always broken (Pamstack was new in + Netpbm 10.0 (June 2002). + + pamtosvg: fix hang. + + ppmfade: fix "file not found" crash for most fade modes. + Introduced in Netpbm 10.98 (March 2022). + + ppmfade: fix incorrect block mode fade. Always broken + (ppmfade was new in Netpbm 8.4 (April 2000)). + + pamaddnoise: fix very incorrect noise added for all types. + Introduced in Netpbm 10.94 (March 2021). + + ppmrough: fix buffer overrun. Always broken (Ppmrough was new + in Netpbm 10.9 (September 2002). + ppmrough: fix excessive roughness. Introduced in Netpbm 10.94 + (March 2021). + + pgmtexture: Fix buffer overflow with maxval > 255. Always + broken. Maxvals > 255 were possible starting in Netpbm 9.0 + (April 2000). + + pgmtexture: Fix bug: ignores -d. Introduced in Netpbm 10.56 + (September 2011). + + xwdtopnm Fix spurious output with really wide/deep rows. + + imgtoppm: Fix spurious output with really wide/deep rows. + + pbmtopgm: Fix error message for excessive -width. + + pbmtoxbm: Fix spurious output with really wide rows. + + tifftopnm: Fix incorrect output with insanely wide/deep rows. + + thinkjettopbm: Fix incorrect output with insanely wide rows. + + ybmtopbm: Fix incorrect output with insanely wide rows. + + pjtoppm: Fix incorrect output with insanely large number of rows. + + library: add check of maxval for computable size. + + Build: Include LDFLAGS in link of shared library. + * Release 11.03.00 + + pamstack: Add -firstmaxval, -lcmmaxval + + pnmcolormap: make result independent of how system's qsort + orders records with equal keys. Affects pnmquant. + + pamtopng: fix typo in error message about -chroma option. + + pamtopng, pnmtopng, pngtopam: fix error message when something + fails in libpng. Always broken (the programs were new in Netpbm + 8.1 (March 2000)). +- modified patches + % netpbm-gcc-warnings.patch (refreshed) + % netpbm-security-code.patch (refreshed) + +------------------------------------------------------------------- +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 + +- Drop patch big-endian.patch, already in upstream since 10.87.00 + +------------------------------------------------------------------- +Sun Sep 18 09:15:29 UTC 2022 - Andreas Schwab + +- ppmforge-fix-overflow.patch: Fix arithmetic overflow in ppmforge +- ppmforge-test.patch: removed + +------------------------------------------------------------------- +Wed Sep 14 13:15:23 UTC 2022 - Andreas Schwab + +- ppmforge-test.patch: fix ppmforge test to avoid float overflow + +------------------------------------------------------------------- +Sun Dec 19 17:47:53 UTC 2021 - Andreas Schwab + +- signed-char.patch: fix bad use of plain char + +------------------------------------------------------------------- +Mon Dec 13 12:32:18 UTC 2021 - pgajdos@suse.com + +- version update to 10.96.4 + palmtopnm: Fix bug: fails with PackBits input on platform with + default unsigned char, such as ppc64. Always broken. (Ability + to convert PackBits input was new in Netpbm 10.27 (March 2005). + + sunicontopnm, escp2topbm, mgrtopbm, ybmtopbm, pamcut, pbmpscale, + pnmcat, pnmpad: Fix arithmetic overrun with ridiculously large + image. + + pamrubber: Fix bug: random behavior with -quad when you specify + both points for source or target and the second one is lower in + the image than the first. Always broken (Pamrubber was new in + Netpbm 10.54 (March 2011)). + + libnetpbm: When validating computable size of width and height, + allow for adding up to 10 instead of 2, to account for rounding + up to a multiple of 8 in processing bit maps. + + pamtogif: Fix bug: doesn't ignore the input alpha mask when user + specified -transparent. Broken in Netpbm 10.37 (December 2006). + + pgmtoppm: Eliminate dependency on color dictionary when user + does not specify any colors by name. + + pamstereogram: Fix crash with -xbegin=0. Thanks Scott Pakin. + Introduced in Netpbm 10.94. + pamtopng: Fix rejection of all BLACKANDWHITE_ALPHA images with + message about wrong depth. Always broken (pamtopng was new in + Netpbm 10.71 (June 2015)). Thanks Karol Kosek + . + + pamtopng: Fix failure with GRAYSCALE_ALPHA images with maxval + less than 255. Always broken (pamtopng was new in Netpbm 10.71 + (June 2015)). Thanks Karol Kosek . + + pamtopng: Fix: treats all tuple types that start with BLA as + BLACKANDWHITE. Always broken (pamtopng was new in Netpbm 10.71 + (June 2015)). + + pamtopng: Fix -transparent option - program recognized + -transparency instead. Always broken (pamtopng was new in + Netpbm 10.71 (June 2015)). + + pamtogif: Fix failure with bogus message about wrong depth with + grayscale and black and white PAM images with transparency. + Always broken (pamtogif was new in Netpbm 10.37 (December 2006)). + Thanks Karol Kosek . + + ppmtogif: Same as 'pamtogif' fix above, but with -alpha option. + + Build: Fix build failure due to missing 'random' function on + Mingw platform. Bug introduced in Netpbm 10.94 (March 2021). + + Build: Don't attempt to build 'pamexec' on systems without + Unix process management. Bug introduced in Netpbm 10.94 + (March 2021). + + Build: Make it work on systems that don't have date +%s. Broken + in Netpbm 10.78 (March 2017). Thanks Claes Nästén + (pekdon@gmail.com). + + Build: Fix for MacOS build failures with missing sprintf and + vasprintf in broken build environment. + + Mkdeb: fix failure with message about unrecognized format of + VERSION file. Introduced in Netpbm 10.90 (March 2020). + Add pamhomography: Thanks Scott Pakin. + + pamstereogram: Add -yfillshift . + + pamtowinicon: Add BMP/PNG encoding to verbose output. + + Use internal random number generator everywhere random numbers + are used except ppmtoilbm, so seeded results are the same on + all platforms. + + pamexec: Issue message instead of being killed by a signal when + the exec'ed program does not read the whole image" + + ppmforge: Fail if -dimension is greater than 5, which is + useless. + + pamscale: Fix bogus "bad magic number" or similar failure most + of the time with -nomix. Broken since Netpbm 10.49 (December + 2009). + + pnmtopng: Fix incorrect transparency in output when requesting + transparency. Introduced after Netpbm 10.35 (August 2006) but + not after Netpbm 10.47 (June 2009). + + pnmtopng: Fix buffer overrun or bogus "too many color/ + transparency pairs" failure when requesting transparency. + Introduced after Netpbm 10.26 (January 2005) but not after + Netpbm 10.35 (August 2006). + + pamtojpeg2k: Fix constant failure with message about file + close failing. + + libnetpbm: pm_system: Fix bug: standard input feeder process + repositions unrelated files. Always broken (pm_system was new + in Netpbm 10.13 (September 2003). + + Pamtowinicon: Fix crash or incorrect output with PNG encoding + (result of pm_system bug above). Always broken (Pamtowinicon + was new in Netpbm 10.63 (June 2013). + + pnmtopng: Fix trivial memory leaks. + + pnmtops: Fix incorrect output (arithmetic overflow) when + bounding box is exactly INT_MAX high or wide. Always broken. + Pnmtops was in primordial Netpbm. +- modified patches + % netpbm-gcc-warnings.patch (refreshed) + % netpbm-security-code.patch (refreshed) +- deleted patches + - signed-char.patch (upstreamed) + +------------------------------------------------------------------- +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 + +- added patches + fix bsc#1170831 -- sent to bryanh@giraffe-data.com on 2020-05-04 + + netpbm-pbmtonokia-cmdline-txt-null.patch + +------------------------------------------------------------------- +Thu Apr 30 14:14:22 UTC 2020 - Martin Liška + +- Add ubsan_build and remove not needed patch netpbm-asan.patch. + +------------------------------------------------------------------- +Fri Dec 20 12:48:25 UTC 2019 - pgajdos@suse.com + +- version update to 10.88.1 + * anytopnm: Fix unpredictable behavior when file name contains + spaces. + pnmquant: Fail if user specifies more than one of -meanpixel, + -meancolor, and -center, rather than just pick one. + * pnmremap: Don't output any part of the image if program fails + because the maxval of input and map file do not match, in a + case where matching maxval is required, i.e. the user specified + -firstisdefault or -missingcolor. + * ppmhist: sort secondarily by RGB with -sort=frequency, so + output is repeatable. + * pnmcolormap: Add -splitpix, -splitcol, -splitdim. + Thanks Vladislav Zavjalov. + * pbmtext: fix erroneous failure message with long input text. + * jpeg2ktopam, pamtojpeg2k: fix negative array index. Always + broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)). + * jpeg2ktopam, pamtojpeg2k: fix assertion failure. Always + broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)). + * jpeg2ktopam: Fix memory leak after decoder failure. Always + broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)). + * jpeg2ktopam: fix null pointer dereference. Always broken + (pamtojpeg2k was new in Netpbm 10.12 (November 2002)). + * pnmtorle, rletopnm: fix wild pointer dereference when memory + allocation fails. Always broken (programs were added to + Netpbm in Release 9.0 (April 2000). + * pamsumm: Fix bug: with -mean and a conflicting option such as + -sum, the program ignores one of the options. It should fail. + Always broken (pamsumm was new in Netpbm 10.21 (March 2004). + pamfind: Add -machine . + * Multiple: fix bug: when you specify the same option twice, you + can get a syntax error, with the message telling you you + specified some other option that conflicts with it. Should just + take the last setting. +- modified patches + % big-endian.patch (refreshed) + % netpbm-security-code.patch (refreshed) + +------------------------------------------------------------------- +Wed Sep 4 06:25:03 UTC 2019 - mvetter@suse.com + +- bsc#1144255 - Drop jasper dependency from netpbm due to removal + of jasper. Disables JPEG2000 support and stops shipping programs + like pamtojpeg2k and jpeg2ktopam +- Add netpbm-disable-jasper.patch + +------------------------------------------------------------------- +Mon Jul 8 07:49:42 UTC 2019 - Andreas Schwab + +- signed-char.patch: fix bad use of plain char +- big-endian.patch: fix dependency on byte order + +------------------------------------------------------------------- +Fri May 31 09:32:34 UTC 2019 - pgajdos@suse.com + +- enable the test suite +- do no ship pstopnm [bsc#1136936] + +------------------------------------------------------------------- +Wed May 15 05:44:20 UTC 2019 - pgajdos@suse.com + +- asan_build: build ASAN included +- debug_build: build more suitable for debugging +- added patches + neccessary for running with ASAN + + netpbm-asan.patch + +------------------------------------------------------------------- +Tue May 14 09:22:13 UTC 2019 - pgajdos@suse.com + +- version update to 10.86.3 + * pnmtopng: Fix bug: Defaults to no filters. Should be all + filters. Effect is larger PNG output. Broken after Netpbm + 10.26 (January 2005) but no later than Netpbm 10.35 (August + 2006). + * pnmtopng: Fix bug: Doesn't allow multiple filter options. + Broken after Netpbm 10.26 (January 2005) but no later than + Netpbm 10.35 (August 2006). + * pnmcrop: Don't allow -borderfile with -reportXXX. It doesn't + work. + * pnmcrop: fix bug: -bgcolor doesn't work. Always present + (-bgcolor was introduced in Netpbm 10.86 (March 2019)). + * pnmcrop: fix bug: incorrect identification of background with + -bgcolor and PBM or PGM image. Always present (-bgcolor was + introduced in Netpbm 10.86 (March 2019)). + * Add pamfind. + * Add pambrighten. + * Add pamhue. + * pnmcrop: Add -bg-color, bg-corner, -reportfull, -reportsize, + -blank-image . + * pamtopng: Add -interlace . + * pamenlarge: Add -scale, -xscale, -yscale . + * pamenlarge: Much faster for PBM with xscale factor above 10; + slightly faster for xscale factor 2-10. + * pamfile: Add -machine and -size . + * pamscale: Add -reportonly + * pamstretch-gen: Add -quiet, -plain. + * pamstretch-gen: Use -dropedge on the 'pamstretch' piece for + better looking output. + * pamstretch: Accept scale factor of 1 as a parameter (already + was accepted with -xscale and -yscale options). + * pamstretch: Don't mess with edge when scale factor is 1, + regardless of -dropedge and -blackedge. + * ppmwheel: Add -huevalue, -huesaturation, -maxval . + * various: Fix unnormalizing code so a value exactly between two + sample values rounds consistently up. Affects many programs. + * pstopnm: Fix bug: -textalphabits has no effect. Always broken. + (-textalphabits was new in Netpbm 10.53 (December 2010)). + * pamtopng: Fix sBit chunk, bit shift value for 1-, 2-, and 4-bit- + per-sample images. Always broken (Pamtopng was new in Netpbm + 10.71 (June 2015)). + * pamtopng: Fix buffer overrun. Always broken (Pamtopng was new + in Netpbm 10.71 (June 2015)). + * pnmtopng: fix bug: -interlace ignored. Broken in 10.55 + (June 2011). + pamstretch: Reject very large scale factors instead of producing + incorrect output. + * ppmbrighten: Fix crash with -normalize when there is only one + intensity in the image. Always broken - Ppmbrighten was new in + the first Netpbm release in 1991. + * ppmdraw: Fix bug: 'setlinetype nodiag' says invalid type. + Always broken. (Ppmdraw was new in Netpbm 10.29 (August 2005)). +- modified patches + % netpbm-gcc-warnings.patch (extended) + +------------------------------------------------------------------- +Mon Dec 31 22:08:29 UTC 2018 - Jan Engelhardt + +- Trim filler wording from descriptions. + +------------------------------------------------------------------- +Mon Dec 31 17:12:02 UTC 2018 - Petr Gajdos + +- updated to 10.85.00 + * pnmpaste: Add -nand, -nor, and -nxor. + * pamcut: add -cropleft, -cropright, -croptop, -cropbottom. + * ppmtobmp: respect -bpp with PBM input. + * bmptopnm: allow single color colormap with bpp 1. + * bmptopnm: validate plane count = 1. + * bmptopnm: Add RLE4 compression decoding. This was ostensibly + added in Netpbm 10.32 (February 2006), but never worked. + * Add pammixmulti. Thanks Scott Pakin (scott+pbm@pakin.org). + * pamtotga: Add -cmap16 . + * pamtris: Add -rgb, -grayscale. Add w parameter to vertex + instructions. Fix perspective correctness. Thanks Lucas Brunno + Luna . + * picttoppm: accept rectangle specifications in input that have + the corners in any order, not just upper left, then lower right. + * pamtotga: identify compressed colormapped format in error + message saying the program doesn't know how to interpret it. + * pamtotga: Ignore extra planes in black and white or grayscale + input instead of generating junk output. + * bmptopnm: Fix wrong output for non-colormapped OS2 BMP. Broken + in Netpbm 10.18 (September 2003). + * bmptopnm: Fix array bounds violation when index value in raster + is too big. Broken after Netpbm 10.11 (October 2002) but before + 10.19 (November 2003). +- modified patches + * netpbm-gcc-warnings.patch + * netpbm-security-code.patch + +------------------------------------------------------------------- +Tue Oct 23 10:39:59 UTC 2018 - Petr Gajdos + +- updated to 10.84.02 + * libnetpbm: Fix invalid memory reference in color name processing + when trivial memory allocation fails. + pamtojpeg2k: fix incorrect interpretation of -ilyrrates option + when it contains multiple delimiter characters in a row. Always + broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)). + * pnmtojbig: fix incorrect handling of -x option. Always broken + (pnmtojbig was new in Netpbm 9.2 (May 2000)). + Add pamaltsat. Thanks Anton Shepelev . + * Add pamtris. Thanks Lucas Brunno Luna + . + * libpbmfont, pbmtext: fix bugs with BDF file lines with + insufficient number of fields. Unknown effect. + * pbmtext: -wchar works with built-in fonts. + * pbmtext: improved -verbose information about BDF fonts: + include CHARSET_REGISTRY, CHARSET_ENCODING. + * libnetpbm font facilities: built-in fonts work with wide + characters. + * pbmtext; libnetpbm BDF font processing: fix invalid memory + reference when BDF font file has invalid syntax. Broken + in primordial Netpbm, ca 1993. + * pamgetcolor: fix bug: gets color of only the top half of a + region. + * pnmfiasco, fiascotopnm: Fix trivial memory leak. Always broken + (programs were new in Netpbm 9.6, July 2000). + +------------------------------------------------------------------- +Wed Sep 26 15:42:52 UTC 2018 - pmonrealgonzalez@suse.com + +- updated to 10.83.00 + * Add pamlevels. Thanks Anton Shepelev . + * Add pamgetcolor. Thanks Anton Shepelev . + * Add rgb-:r/g/b color specification format. + * pngtopam: Fix bogus warning of non-square pixels when image does + not contain pixel resolution information. Introduced in Netpbm + 10.48 (September 2009). + * pstopnm: Fix divide-by-zero crash when Postscript input says + the image has zero size. + * pstopnm: Fix divide-by-zero crash when computed resolution + rounds down to zero dots per inch. + * pbmmask: Fix invalid memory reference with zero-dimension + input image. Broken in primordial Netpbm, ca 1989. + [CVE-2018-8975, bsc#1086777] + https://sourceforge.net/p/netpbm/code/3279/ + * libnetpbm: Add pnm_colorspec_rgb_integer, + pnm_colorspec_rgb_norm, pnm_colorspec_rgb_x11, + pnm_colorspec_dict, pnm_colorspec_dict_close. + * libnetpbm: Add pnm_parsecolor2. + * libnetpbm: Add pnm_allocpamtuplen, pnm_freepamtuplen. + * libnetpbm: Make the normalized tuple functions respect the + allocation depth specified in struct pam (member + 'allocation_depth') instead of using the actual tuple depth + (member 'depth'). + * ilbmtoppm: Fix bug: may fail with bogus error message about an + invalid CLUT chunk if image has a CLUT chunk. Introduced after + Netpbm 10.26 (January 2005) and at or before Netpbm 10.35 + (August 2006). + +- Refreshed patch netpbm-security-code.patch + +- Dropped patch fixed upstream netpbm-CVE-2018-8975.patch + +- Renamed script prepare-src-tarball to prepare-src-tarball.sh + +------------------------------------------------------------------- +Wed Jun 27 14:04:30 UTC 2018 - pgajdos@suse.com + +- security update + * CVE-2018-8975 [bsc#1086777] + + netpbm-CVE-2018-8975.patch + +------------------------------------------------------------------- +Wed Jun 27 11:38:22 UTC 2018 - pgajdos@suse.com + +- updated to 10.82.2 + * Pngtopam: Fix bogus warning of non-square pixels when image does + not contain pixel resolution information. Introduced in Netpbm + 10.48 (September 2009) + * ilbmtoppm: Fix bug: may fail with bogus error message about an + invalid CLUT chunk if image has a CLUT chunk. Introduced after + Netpbm 10.26 (January 2005) and at or before Netpbm 10.35 + (August 2006). + * pbmtext: Add -wchar. + * pbmtext: Add -text-dump option. + * ppmhist: Add color summary to top of output, (except with + -noheader). + * pnmremap: Add -randomseed. + * pnmquant: Add -norandom, -randomseed. + * pamtogif: Add -noclear option. + * giftopnm: Check "data width" value from GIF image properly: + can't be bigger than 11, because the minimum code size is one + more than the data width and the maximum code size is 12. (Note + that GIF spec prohibits anything more than 8). + * pnmpsnr: Add -targetX options. + * ppmrainbow: Add "ppmrainbow: " to error messages, like other + programs. + * ppmrainbow: improve error message. + * g3topbm: Fix bug - produces invalid empty PBM image if input + image is empty. + * ppmpat: Fix bug - crash or junk output with -camo or -anticamo + and no -color. Introduced in Netpbm 10.78 (March 2017). + * mrftopbm: Fix bug - wrong error messages or output when input + invalidly short. Always broken (mrftopbm was new in Netpbm + 10.18 (September 2003). + * sldtoppm: -lib and -dir don't work - always says slide not + found. Broken in Netpbm 10.63 (June 2013). + * sldtoppm: fix bug: says AutoCAD slide file isn't an AutoCAD + slide file. Broken after Netpbm 10.26 (January 2005), but no + later than 10.35 (August 2006). + * sldtoppm: fix bug: wild memory accesses, weird messages when + invalid input file has unterminated strings. +- refreshed netpbm-security-code.patch +- fixed prepare-src-tarball update script + +------------------------------------------------------------------- +Fri Dec 29 13:52:55 UTC 2017 - tchvatal@suse.com + +- Add patch makeman-py3.patch to make sure to use python3 when + building +- Unpack the stuff only once + +------------------------------------------------------------------- +Mon Dec 18 13:30:51 UTC 2017 - pgajdos@suse.com + +- updated to 10.80.1 + * pnmtopalm: Refuse to create a compressed image with more than 8 + bits per pixel. + * pbmtext, libnetpbm font facilities: allow glyphs in font files + that have no bitmap data; just used for their advance value to + code a space. + * pbmtext: Improve error message when there is a problem reading + the font file. + * libnetpbm font facilities: consider font invalid if a glyph is + more than 65536 pixels high or wide. + * ppmshadow: handle images with a black background and low + contrast images (i.e. little difference between foreground and + background). + * ppmbrighten: fix bug: red pixels change hue. Introduced in + after Netpbm 10.11 (October 2002) and before Netpbm 10.18 + (September 2003). + * palmtopnm: fix crash if invalid input contains color index that + is not in the palette. Always broken (palmtopnm was new in + Netpbm 9.10 (October 2001)). + * pnmtopalm: fix incorrect output with certain input files and + -packbits_compression. Always broken. -packbits_compression + was new in Netpbm 10.27 (March 2005). + * pnmtopalm: Correct error message recommending running + pnmquant when the real solution is to run pnmremap to modify the + image to Palm standard colors. + * pnmtopalm: Fix bug causing "color not in colormap" failure with + -colormap and maxval other than 255. + * libnetpbm: font facilities: fix invalid memory reference with + certain font files. + * libnetpbm: ppm_readcolordict: Improve error message when there is + a problem reading the color dictionary. Affects ppmhist. + * pgmmake: Fix bug: treats non-numeric gray-level argument as zero. + Always broken (Pgmmake was new in Netpbm 10.32, February 2006). + * pdbimgtopam, pamtopdbimg: fix various cases of incorrect output, + some always present (programs were new in Netpbm 10.52.00 + (October 2010)). + * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of + rgb: color specifications: yields value slightly too dim. + Affects many programs. Broken in Netpbm 10.79 (June 2017). + +------------------------------------------------------------------- +Wed Aug 2 10:28:18 UTC 2017 - tchvatal@suse.com + +- Version update to 10.79.3: + * Fix license clash between GPL-2 and GPL-3 + * Few small fixes + +------------------------------------------------------------------- +Wed Jul 12 07:50:42 UTC 2017 - tchvatal@suse.com + +- Drop patch netpbm-missing-file-close.patch fixed differently by + upstream +- Drop patch netpbm-jasper.patch which is no longer needed +- Remove accidental -O0 added to cflags +- Version update to 10.79.2: + * Fix 'format-security' GNU compiler warning. + * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of + rgb: color specifications: yields value slightly too dim. + * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev + + * pnmconvol: Extend -normalize to be applicable to convolution + kernels specified by PGM file. Thanks Anton Shepelev + + * g3topbm: tolerate fill bits. + * pbmtog3: Add -align8, -align16. + * ppmshadow: Improve results for very small maxval. + * ppmshadow: eliminate extraneous messages from pnmconvol. + * libnetpbm: Improve error message for purported image that is + exactly 1 byte long (so ends in the middle of what would be the + magic number). + * pbmtox10bm: Get the Perl interpreter for this Perl program from + the PATH instead of hardcoded as /usr/bin/perl (like all other + Netpbm Perl programs). + * ppmcolormask: fix incorrect output when input maxval is not 255. + * bmptopnm: fix crash when input is a Windows BMP with negative + number for width. Always broken. (bmptopnm was new, as + bmptoppm, in original Netpbm, 1992). + * pamcomp: fix incorrect output with -mixtransparency. + Always broken. (-mixtransparency was new in Netpbm 10.56, + September 2011). + * pamcomp: remove debug trace message with -mixtransparency. + Always broken. (-mixtransparency was new in Netpbm 10.56, + September 2011). + * pnmtojpeg: fix array bounds violation in argument list. Always + broken (pnmtojpeg was new to Netpbm in Netpbm 8.2 (March 2000). + * pamcrater: fix incorrect output with non-square image. + Introduced in Netpbm 10.69 (December 2014). + * svgtopam: fix treating negative width or height values in SVG + like twos complement positive numbers; fail instead. Always + broken (svgtopam was new in Netpbm 10.33 (March 2006)). + * svgtopam: fix error messages when input has splines or negative + positions. Always broken (svgtopam was new in Netpbm 10.33 + (March 2006)). + * libnetpbm: fix bug: pm_system_XXX closes Standard Input if you + supply a Standard Output accepter but not a Standard Input + feeder. Broken since Netpbm 10.40 (September 2007). + * Build: don't try to build standardppmdfont.c if it already + exists (so don't require ppmdcfont to exist). Broken around + Netpbm 10.35 (2006). + * Build: Define _XOPEN_SOURCE=500 in source files that use M_PI. + While C libraries in the past have always provided this with + just _XOPEN_SOURCE=null, it appears that M_PI is actually + defined by Single Unix Specification 2, aka UNIX98, for which + you need _XOPEN_SOURCE=500, and Cygwin has changed to enforce + this. + +------------------------------------------------------------------- +Fri Jun 9 06:11:25 UTC 2017 - pgajdos@suse.com + +- updated to 10.78.5 + * pamgauss: Fix skewed output with even dimension. + * bmptopnm: fix crash when input is a Windows BMP with negative + number for width. + +------------------------------------------------------------------- +Mon Jun 5 15:08:18 UTC 2017 - pgajdos@suse.com + +- updated to 10.78.4 + * pamcrater: fix incorrect output with non-square image. + * libnetpbm: fix bug: pm_system_XXX closes Standard Input if you + supply a Standard Output accepter but not a Standard Input + feeder. + * fix incorrect output with -mixtransparency. + * pamcomp: remove debug trace message with -mixtransparency. + * pnmtojpeg: fix array bounds violation in argument list. + * ppmpat: Add -color. + * ppmpat: Add -argyle1, -argyle2. + * pnmtotiff: Fail with -miniswhite or -minisblack on color image + rather than produce an invalid TIFF. + * tifftopnmcmyk: Default rows per strip to the TIFF library + default instead of whatever yields 8K strips. + * tifftonm: Fix incorrect PBM output with two-color paletted TIFF + image. + * tifftopnm: Fix memory corruption when image is more pixels than + can be represented as a C unsigned integer. + * tifftopnmcmyk: Fix bug: fails with very wide images and no + -rowsperstrip. + * svgtopam: Fix crash when out of memory. + * pnmcrop: Add -closeness + * libnetpbm: ppmd_fill_path: remove debug trace. + * pnmpad: Fix bug: incorrect output width. +- removed netpbm-no-build-date.patch: not needed since: + * --version global option: with SOURCE_DATE_EPOCH environment + variable, display source code datetime instead of build + datetime. + +------------------------------------------------------------------- +Tue Nov 22 10:30:26 UTC 2016 - pgajdos@suse.com + +- updated to 10.76.0 + * pnmquantall: Fix failure when temporary file location is + not the same filesystem as the output file. + * pnmquantall: Fix incorrect handling of when the Pnmremap or + the final rename fails. + * giftopnm: Fix bug: crash on little-endian computers that can't + toleration unaligned memory access. Thanks Ignatios Souvatzis + (is@netbsd.org). Broken in Netpbm 10.47 (June 2009). + * cmuwmtopbm: fix trivial memory leak. Always broken (cmuwmtopbm + was in primordial Pbmplus, in 1988). + * Build: tifftopnm.c: fix undefined WIFSIGNALED, etc. + +------------------------------------------------------------------- +Tue Oct 25 10:54:59 UTC 2016 - fstrba@suse.com + +- Added patch: + * netpbm-jasper.patch + + Fix build with newer jasper + +------------------------------------------------------------------- +Mon Aug 22 15:39:46 UTC 2016 - pgajdos@suse.com + +- updated to 10.75.1 + * see HISTORY for upstream changelog + * refreshed, reduced, extended patches: + netpbm-security-code.patch + netpbm-security-scripts.patch + netpbm-gcc-warnings.patch + +------------------------------------------------------------------- +Thu Dec 17 11:29:19 UTC 2015 - pgajdos@suse.com + +- updated to 10.72.4 + * see HISTORY for upstrem changelog + * added useful returns + + netpbm-gcc-warnings.patch + * forwardported + . netpbm-security-code.patch + +------------------------------------------------------------------- +Tue Jun 23 14:00:50 UTC 2015 - mvyskocil@opensuse.org + +- Drop all libp?m.so symlinks + +------------------------------------------------------------------- +Mon May 11 14:46:14 UTC 2015 - pgajdos@suse.com + +- updated to 10.70.4 + * pambackground: fix bug: segfault or incorrect results in most + cases. + * ppmtoarbtxt: Fix some undefined behavior when program limits + are exceeded. + * anytopnm: convert all images in a multi-image GIF instead of + just the first. + * nmnorm: add -bsingle, -wsingle. + * pamtosvg: fix use of unset variable; probably results in a + crash. + * pnmgamma -srgbtobt709, -bt709tosrgb: fix bug; incorrect output + nearly always. + * pamtilt: fix bug: unconditional crash. + * pgmmorphconv: fix bug: always produces PGM Plain format. + * giftopnm: Fix bug: crashes if purported GIF has neither a global + color map nor a local one. + * pgmmorphconv: add -gradient. + * pnmhisteq: add -noblack and -nowhite. + * tifftopnm: allow input file to be nonseekable. + * Add yuy2topam. + * Add pgmtosbig. + * Add st4topgm, pgmtost4. + * ppmtoarbtxt: fix bug: wrong output when high numbers represent + darker. + * ppmtorgb3: Fix buffer overflow with long input file name. + * st4topgm: Fix bug: with no argument, uses file named "'" instead + of Standard Input. + * pnmconvol: Fix bug: wrong output for pixels that convolve to + negative values (should be clipped to zero). + +------------------------------------------------------------------- +Wed Nov 19 09:11:12 UTC 2014 - pgajdos@suse.com + +- updated to 10.68.1 + * pnmconvol: add -bias . + * Remove pnmcomp, install a pnmcomp symlink for pamcomp. + * Fix incorrect option parsing when there are multiple common + options (e.g. -plain -quiet). + * cameratopam: fix buffer overflow. + * cameratopam: fix incorrect output. + * ppmtopict: Fix unconditional crash. + +------------------------------------------------------------------- +Mon Sep 8 08:17:28 UTC 2014 - pgajdos@suse.com + +- updated to 10.67.4 + * pcdovtoppm: Fix crash due to invalid operator == on some + systems. + * Fix incorrect option parsing when there are multiple common + options (e.g. -plain -quiet). + * sgitopnm: add ability to convert 2-channel SGI image. + Thanks Prophet of the Way . + * etc. see HISTORY + +- modified patches: + * netpbm-make.patch (refreshed) + * netpbm-security-code.patch (refreshed) + +------------------------------------------------------------------- +Mon Sep 8 02:07:35 UTC 2014 - crrodriguez@opensuse.org + +- minor: man pages from section 3 are developer docs, move + to -devel package + +------------------------------------------------------------------- +Sat Aug 30 16:56:34 UTC 2014 - coolo@suse.com + +- fix license for spdx 1.2 (IJG is now part of it, loosing SUSE prefix) + +------------------------------------------------------------------- +Mon Jun 23 13:53:54 UTC 2014 - pgajdos@suse.com + +- updated to 10.66.3 + * sgitopnm: fix bug: no output if input is RLE compressed. + * jpegtopnm -dumpexif: fix incorrect display of resolution. + * jpegtopnm -dumpexif: fix truncated make, model, or datetime. + * jpegtopnm -dumpexif: fix wild pointer with invalid EXIF data. + * build fixes + +------------------------------------------------------------------- +Tue Apr 1 11:25:10 UTC 2014 - pgajdos@suse.com + +- updated to 10.66.00 + * Add pamvalidate. + * Add pamfix: Does what pamfixtrunc did, plus repairs excessive + sample values. + * pgmramp: add -diagonal. + * libnetpbm: Read functions validate that sample values do not + exceed maxval. + * etc. see HISTORY for details + +------------------------------------------------------------------- +Wed Nov 27 08:36:15 UTC 2013 - pgajdos@suse.com + +- updated to 10.64.04 + * pnmtops: Fix bug: wrong output with -ascii85. Introduced in + 10.63 (June 2013). + * pnmtops: Fix bug: wrong output with -rle. Introduced in + 10.63 (June 2013). + * pnmtops: Fix bug: fails with message about waitpid() failing + if invoked with SIGCHLD ignored. Introduced in 10.56 + (September 2011). + * pnmtops: Fix bug: closes Standard Error. Introduced in + 10.64.02 (today). + * pnmtops: Fix bug: program hangs if it inherits lots of open + files. Introduced in 10.56 (September 2011). + * pngtopam: fix bug: ignores -gamma. Introduced in 10.48 + * see HISTORY for details +- removed wordaccess-include-be.patch (upstreamed) +- removed stdbool-after-jasper.patch (workaround not needed yet) + +------------------------------------------------------------------- +Thu Oct 3 20:47:11 UTC 2013 - dvaleev@suse.com + +- fix include syntax for BigEndian platforms + (wordaccess-include-be.patch) + +------------------------------------------------------------------- +Wed Sep 11 08:05:40 UTC 2013 - pgajdos@suse.com + +- updated to 10.63.01 + * pngtopam: fix bug: ignores -gamma. Introduced in 10.48 + (September 2009). + * Add pamtowinicon, winicontopam. Thanks Ludolf Holzheid. + * pgmnoise: add -maxval, speed up. Thanks Prophet of the Way. + * etc. see doc/HISTORY +- added stdbool-after-jasper.patch, to be removed in the next + submission [bnc#839584] + +------------------------------------------------------------------- +Mon Dec 31 12:14:17 UTC 2012 - pgajdos@suse.com + +- Update to 10.61.01: + * pamstereogram: change -guidesize default from 10 to 20 + * pgmhist: Add -machine option. + * pgmhist: Add -median, -quartile, and -decile options. + * pamstereogram: Add -guidetop and -guidebottom options to replace + trick where negative -guidesize means top, positive means + bottom, absent means none. + * pamstereogram: -smoothing smooths images even without -texfile. + * pnmcat: set don't care bits in packed PBM output to zero so + they are predictable. + * etc. see doc/HISTORY + +------------------------------------------------------------------- +Sun Dec 2 14:44:51 UTC 2012 - asterios.dramis@gmail.com + +- Update libmin to 60. +- Added libjpeg-devel, libxml2-devel and pkgconfig(x11) as build requirements. + +------------------------------------------------------------------- +Wed Nov 21 08:25:24 UTC 2012 - pgajdos@suse.com + +- updated to 10.60.03: + * Xbmtopbm: fix incorrect output, memory leak. Thanks Prophet of + the Way . + * Pamtojpeg2k: default to no compression ratio constraint and + allow compression ratios less than 1. Because of compression + metadata, small images do require loss of quality in order to + get down to a compression ratio of 1. + * Sunicontopnm: Fix incorrect output for depth 8. Always broken + (depth = 8 capability was added in Netpbm 10.53 (December 2010). + + pamgauss: Fix bug: erroneously says -maxval is too big on 64 bit + system. Always broken (Pamgauss was added in 10.23 (July 2004). + * xpmtoppm: major speedup for 3-character-per pixel files, + memory reduction for all files: use hash table instead of + linear search or direct index, go row by row. + * xpmtoppm: fix bogus "color number too large" failure. Broken + in 10.49 (December 2009). + * pnm_hashtuple: slight performance improvement from new hash + function. Thanks Prophet of the Way . + * ppmtospu: wild memory accesses. Always broken (program added in + 10.58 (March 2012). + * pamtosrf: fix storage corruption. Always broken (program added + in 10.55 (June 2011). + +------------------------------------------------------------------- +Tue Nov 20 09:34:37 UTC 2012 - pgajdos@suse.com + +- add url tag + +------------------------------------------------------------------- +Thu Sep 6 15:16:56 UTC 2012 - pgajdos@suse.com + +- updated to 10.59.2: + * transition super-stable --> advanced branch + * builds with libpng15 + * patches summary: + -> dropped unneeded or upstreamed patches: + - fixes.patch + - libpng14.patch + - manpages.patch + - pamscale.patch + - pnmtopng-CAN-2978.patch + -> left patches + # make.patch (suse specific) + # no-build-time.patch (suse specific) + # missing-file-close.patch (should be upstreamed in newer + versions) + # tmpfile.patch (rewritten) + # security-code.patch (taken from fedora, replacement of + former security.patch) + # security-scripts.patch (taken from fedora, replacement of + former security2.patch) + +------------------------------------------------------------------- +Thu Aug 30 10:04:11 UTC 2012 - cfarrell@suse.com + +- license update: BSD-3-Clause and GPL-2.0+ and SUSE-IJG and MIT and + SUSE-Public-Domain + SPDX format, as per Fedora declaration + +------------------------------------------------------------------- +Tue Aug 7 12:48:33 UTC 2012 - pgajdos@suse.com + +- updated to 10.35.86: + * ppmtobmp: fix failure with "internal error" message on all + uses. + * pamscale: fix all black output with resampling. + * pgmtexture: fix integer overflow in difference variance. + * pgmtexture: fix array bounds violations in various calculations. + * pngtopnm: fix crash with invalid tIME chunk. + +------------------------------------------------------------------- +Tue Nov 1 14:29:33 UTC 2011 - pgajdos@suse.com + +- updated to 10.35.82: + * pnmtopng: fix bug: with -alpha specifying a mask which contains + no fully transparent area, output PNG is fully opaque. + Introduced in 10.29. + * pnmquant: work with older Perl that doesn't have 3-argument open. + * pnmtops: fix message: says "from top edge" where it means + "from bottom edge." + * pgmtexture: fix wrong sum variance result. Wrong since the + beginning. Thanks Francois P. S. Luus . + +------------------------------------------------------------------- +Tue May 24 14:04:05 UTC 2011 - pgajdos@novell.com + +- updated to 10.35.80: + * asciitopgm: fix bug: memory corruption on too-long lines. + * asciitopgm: fix bug: improper handling of blank lines. + * pngtopnm: fix bug: -verbose reports history chunk present when + it's really a palette. + * bmptopnm: Don't crash on invalid zero value of image height in + the BMP header of a compressed file. + * bmptopnm: don't crash on large invalid value of 'colorsused' in + the BMP header. + * ilbmtoppm: Don't crash on image that has a transparent color + index, but no color map. + +------------------------------------------------------------------- +Tue Nov 16 15:19:40 CET 2010 - pgajdos@suse.cz + +- updated to 10.35.77: + * ppmtompeg: fix crash with free of unallocated memory. + * Build: don't expect snprintf() to exist. + * Build: don't use or bzero(). + +------------------------------------------------------------------- +Wed Sep 1 11:13:33 CEST 2010 - pgajdos@suse.cz + +- updated to 10.35.76: + * Pnmtopng: -libversion doesn't report level of linked libz. + * don't fail due to SIGRTMIN, SIGRTMAX being undefined. + * palmtopnm: fix for pixel size 16. Thanks Paul Bolle + . + * fix -reduce. Introduced in 10.27. +- build against libpng14 + * libpng14.patch + +------------------------------------------------------------------- +Tue Aug 31 03:55:28 UTC 2010 - cristian.rodriguez@opensuse.org + +- Do not include build date in binaries + +------------------------------------------------------------------- +Tue Apr 6 11:21:31 CEST 2010 - pgajdos@suse.cz + +- requires libpng12-compat-devel instead of libpng-devel for build: + netpbm will be compatible with libpng 1.4 branch from + version 10.48 + +------------------------------------------------------------------- +Tue Mar 30 12:33:31 CEST 2010 - pgajdos@suse.cz + +- updated to 10.35.74 (see doc/HISTORY) + * upstreamed or outdated + - colornames-init.diff (present in the code) + - endian.patch (tested against bnc#105431) + - pamtouil.patch (present in the code) + - ximtoppm-fixes.patch (present in the code) + - [partially, refreshed] fixes.patch + - pngtomng-transparent.patch (tested against bnc#225258) + - rgb.patch (/usr/share/X11/rgb.txt is in RGB_DB2 yet) + * .dif renamed to make.patch + * gcc45.patch merged into fixes.patch + +------------------------------------------------------------------- +Sat Feb 13 23:57:33 CET 2010 - rguenther@suse.de + +- fix harmless buffer-overflow to fix build with GCC 4.5 + +------------------------------------------------------------------- +Fri Dec 18 22:20:11 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Tue Nov 24 18:59:59 CET 2009 - pgajdos@suse.cz + +- updated to 10.35.69 (see HISTORY) + +------------------------------------------------------------------- +Thu Aug 6 10:40:15 CEST 2009 - pgajdos@suse.cz + +- updated to 10.35.66 (see HISTORY) + + mainly build fixes +- added fclose [bnc#528306] + * missing-file-close.patch + +------------------------------------------------------------------- +Mon Jul 13 22:09:48 CEST 2009 - coolo@novell.com + +- fix broken symlink + +------------------------------------------------------------------- +Wed Jun 17 16:28:54 CEST 2009 - nadvornik@suse.cz + +- improved generating of man pages [bnc#431226] +- fixed various warnings + +------------------------------------------------------------------- +Tue Jun 16 14:06:12 CEST 2009 - nadvornik@suse.cz + +- generate man pages from html + +------------------------------------------------------------------- +Mon Jun 15 16:56:54 CEST 2009 - nadvornik@suse.cz + +- updated to 10.35.64 + * for detailed changelog see + /usr/share/doc/packages/netpbm/HISTORY +- use security patches from Fedora + +------------------------------------------------------------------- +Mon Jun 1 14:22:31 CEST 2009 - nadvornik@suse.cz + +- build fix: use non-conflicting name instead of "getline" + +------------------------------------------------------------------- +Wed Jan 14 10:22:46 CET 2009 - olh@suse.de + +- obsolete libnetpbm-XXbit instead of netpbm-XXbit + +------------------------------------------------------------------- +Wed Jan 7 12:34:56 CET 2009 - olh@suse.de + +- obsolete old -XXbit packages (bnc#437293) + +------------------------------------------------------------------- +Fri Nov 28 16:05:39 CET 2008 - nadvornik@suse.cz + +- fixed a crash in pamperspective by an update to newer + version [bnc#440954] + +------------------------------------------------------------------- +Wed Oct 22 15:11:50 CEST 2008 - nadvornik@suse.cz + +- fixed "pamscale -reduce" [bnc#391972] + +------------------------------------------------------------------- +Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de + +- added baselibs.conf file to build xxbit packages + for multilib support + +------------------------------------------------------------------- +Fri Feb 1 21:25:57 CET 2008 - meissner@suse.de + +- fixed potential 1 byte array overread + +------------------------------------------------------------------- +Wed Nov 21 15:56:56 CET 2007 - nadvornik@suse.cz + +- compile with -flax-vector-conversions + +------------------------------------------------------------------- +Fri Nov 9 17:19:46 CET 2007 - nadvornik@suse.cz + +- use system libjasper [#339731] + +------------------------------------------------------------------- +Thu Jul 19 11:34:07 CEST 2007 - nadvornik@suse.cz + +- updated to 10.26.44 (many bugfixes) +- applied Shared Library Packaging Policy: + * created libnetpbm-devel subpackage + * renamed libnetpbm to libnetpbm10 + +------------------------------------------------------------------- +Wed Apr 11 16:19:31 CEST 2007 - nadvornik@suse.cz + +- removed ppmtompeg sources [#261140] + +------------------------------------------------------------------- +Thu Mar 29 14:13:44 CEST 2007 - rguenther@suse.de + +- add flex BuildRequires + +------------------------------------------------------------------- +Wed Dec 6 11:21:08 CET 2006 - prusnak@suse.cz + +- fixed pamtouil crash when -name was specified (pamtouil.patch) +- changed transparency handling (pnmtopng-transparent.patch) [#225258] + +------------------------------------------------------------------- +Thu Nov 30 17:34:42 CET 2006 - prusnak@suse.cz + +- fixed missing manpages [#224478] +- fixed segfault in pbmtext [#224420] + +------------------------------------------------------------------- +Tue Nov 14 14:52:55 CET 2006 - prusnak@suse.cz + +- fixed [#216670] + - removed man pages that pointed to online documentation (manpages.patch) + - added man pages generated from HTML documentation (manpages.tar.bz2) + +------------------------------------------------------------------- +Thu Mar 23 17:12:34 CET 2006 - nadvornik@suse.cz + +- fixed uninitialized variables [#155948] + +------------------------------------------------------------------- +Wed Jan 25 21:38:39 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Thu Jan 12 16:31:23 CET 2006 - nadvornik@suse.cz + +- compile with -fstack-protector + +------------------------------------------------------------------- +Thu Jan 5 17:46:45 CET 2006 - nadvornik@suse.cz + +- updated to 10.26.22 + +------------------------------------------------------------------- +Tue Nov 15 19:17:40 CET 2005 - nadvornik@suse.cz + +- fixed possible buffer overflow [#133649] + +------------------------------------------------------------------- +Thu Oct 13 11:33:28 CEST 2005 - nadvornik@suse.cz + +- fixed possible buffer overflow (CAN-2005-2978) [#119601] + +------------------------------------------------------------------- +Mon Sep 26 17:52:57 CEST 2005 - nadvornik@suse.cz + +- fixed fiasco on bigendian [#105431] + +------------------------------------------------------------------- +Tue Aug 9 17:19:09 CEST 2005 - nadvornik@suse.cz + +- call ghostscript with the -dSAFER option [#102527] + +------------------------------------------------------------------- +Mon Aug 1 10:14:20 CEST 2005 - nadvornik@suse.cz + +- fixed libnetpb.so symlink + +------------------------------------------------------------------- +Fri Jul 29 17:13:34 CEST 2005 - nadvornik@suse.cz + +- installed palm colormaps required by plucker + +------------------------------------------------------------------- +Thu Jul 28 20:58:18 CEST 2005 - nadvornik@suse.cz + +- updated to 10.26.12 + +------------------------------------------------------------------- +Wed Jun 22 16:07:55 CEST 2005 - schwab@suse.de + +- Fix aliasing bug. +- Don't strip binaries. + +------------------------------------------------------------------- +Thu Jan 6 12:31:14 CET 2005 - nadvornik@suse.cz + +- updated to 10.18.18 +- fixed tempdir handling in anytopbm [#49446] + +------------------------------------------------------------------- +Fri Nov 19 11:27:44 CET 2004 - ro@suse.de + +- fixed file list + +------------------------------------------------------------------- +Tue Aug 31 22:08:00 CEST 2004 - jw@suse.de + +- fix uninitialized colornames in libppmcolor.c, + that caused ppmtoxpm to segv on x86-64. + +------------------------------------------------------------------- +Fri Aug 27 10:19:05 CEST 2004 - kukuk@suse.de + +- Fix .so symlink + +------------------------------------------------------------------- +Thu Aug 26 16:06:55 CEST 2004 - nadvornik@suse.cz + +- updated to 10.18.15: many bugfixes, incuding pnmtopng fix [#42868] + +------------------------------------------------------------------- +Thu Mar 18 16:27:04 CET 2004 - nadvornik@suse.cz + +- do not pack /usr/bin/doc.url [#36329] + +------------------------------------------------------------------- +Fri Mar 05 14:10:33 CET 2004 - nadvornik@suse.cz + +- fixed pbmtextps [#32104] +- fixed dangerous compiler warnings + +------------------------------------------------------------------- +Mon Jan 26 17:49:30 CET 2004 - nadvornik@suse.cz + +- fixed temp files handling [#34036] + +------------------------------------------------------------------- +Sat Jan 10 16:38:36 CET 2004 - adrian@suse.de + +- add %run_ldconfig + +------------------------------------------------------------------- +Thu Sep 18 10:55:50 CEST 2003 - nadvornik@suse.cz + +- fixed tail/head syntax [#31231] + +------------------------------------------------------------------- +Wed May 28 11:59:00 CEST 2003 - nadvornik@suse.cz + +- remove unpackaged files from buildroot + +------------------------------------------------------------------- +Thu Feb 13 18:22:39 CET 2003 - ro@suse.de + +- fix symlink for libnetpbm.so + +------------------------------------------------------------------- +Tue Feb 11 18:47:07 CET 2003 - nadvornik@suse.cz + +- updated to 10.11.4 + +------------------------------------------------------------------- +Mon Aug 05 17:05:05 CEST 2002 - nadvornik@suse.cz + +- removed g3topbm again + +------------------------------------------------------------------- +Mon Jul 29 14:07:27 CEST 2002 - schwab@suse.de + +- Fix reference to perl in scripts. + +------------------------------------------------------------------- +Sat Jul 27 18:53:34 CEST 2002 - kukuk@suse.de + +- Create compatibility links for the old libraries to compile + old sources + +------------------------------------------------------------------- +Sat Jul 27 09:50:13 CEST 2002 - meissner@suse.de + +- %_lib fixes, use RPM_OPT_FLAGS and -fPIC + +------------------------------------------------------------------- +Fri Jul 26 21:39:00 CEST 2002 - adrian@suse.de + +- fix neededforbuild + +------------------------------------------------------------------- +Fri Jul 26 12:25:48 CEST 2002 - nadvornik@suse.cz + +- updated to 10.5: + - libraries libpbm, libpgm, libpnm, libppm merged to libnetpbm + - documentation is in html only + +------------------------------------------------------------------- +Tue May 14 13:40:53 CEST 2002 - nadvornik@suse.cz + +- fixed usage of the %{_libdir} macro + +------------------------------------------------------------------- +Tue Feb 26 14:56:37 CET 2002 - nadvornik@suse.cz + +- fixed "#!/bin/sh" line in ppmtomap + +------------------------------------------------------------------- +Thu Feb 7 16:37:29 CET 2002 - nadvornik@suse.cz + +- updated to 9.24 + +------------------------------------------------------------------- +Fri Feb 1 00:26:08 CET 2002 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Thu Jan 10 16:21:10 CET 2002 - nadvornik@suse.cz + +- update to 9.23: + - bugfix release +- patched pnmtops to accept -dpi x [bug #12591] +- used macros %{_lib} and %{_libdir} + +------------------------------------------------------------------- +Wed Dec 5 18:11:02 CET 2001 - nadvornik@suse.cz + +- update to 9.21: + - new: pamdeinterlace, pnmquant, ppmtoneo, neotoppm + +------------------------------------------------------------------- +Tue Sep 4 10:13:47 CEST 2001 - nadvornik@suse.cz + +- removed jbigtopnm and pnmtojbig because of potential patent + problems [bug #9903] +- fixed segfault in icontopnm + +------------------------------------------------------------------- +Thu Aug 23 18:48:36 CEST 2001 - ro@suse.de + +- added pm.h and pm_config.h to INTERFACE_HEADERS + (pm.h is included by pbm.h and includes pm_config.h) + +------------------------------------------------------------------- +Thu Aug 23 15:04:35 CEST 2001 - nadvornik@suse.cz + +- update to 9.16 + new: pbmtopsg3 (Postscript G3 fax), pbmtonokia, ppmrainbow + pamoil (a replacement for pgmoil) + fixes and updates: + ppmtogif, ppmtojpeg, xpmtoppm, pnmtopng/pngtopnm, + giftopnm, ppm3d, tifftopnm, pgmcrater, pnmgamma, + ppmcie, pnmscale, pnmscalefixed, ppmtoeyuv, eyuvtoppm + pstopnm +- removed hpcdtoppm from source, because selling and commercial + using is prohibited + +------------------------------------------------------------------- +Tue Jun 5 14:23:11 CEST 2001 - pblaha@suse.cz + +- upgrade on 9.14 +- add documentation and examples for ppmtompeg fix bug #8647 + +------------------------------------------------------------------- +Thu Apr 5 17:38:19 CEST 2001 - pblaha@suse.cz + +- make ln -s pnmtoplainpnm pnmnoraw and ln -s gemtopnm gemtopbm + +------------------------------------------------------------------- +Tue Apr 3 10:44:48 CEST 2001 - kukuk@suse.de + +- Remove g2topbm again due conficts with g3utils + +------------------------------------------------------------------- +Mon Mar 26 14:47:55 CEST 2001 - pblaha@suse.cz + +- update on 9.12 + +------------------------------------------------------------------- +Wed Mar 14 14:56:39 CET 2001 - pblaha@suse.cz + +- remove g3topbm due to conflict with g3utils + +------------------------------------------------------------------- +Wed Mar 7 18:04:02 CET 2001 - pblaha@suse.cz + +- update on 9.11 + +------------------------------------------------------------------- +Wed Jan 24 11:59:36 CET 2001 - pblaha@suse.cz + +- update on 9.10 + +------------------------------------------------------------------- +Fri Dec 22 00:48:09 MET 2000 - garloff@suse.de + +- Add Provides + Obsoletes: libnetpb. +- Use some more macros in spec file. +- bzip2 source. + +------------------------------------------------------------------- +Tue Dec 5 15:16:05 CET 2000 - schwab@suse.de + +- Be sure to compile with -fpic. + +------------------------------------------------------------------- +Mon Dec 4 19:10:35 CET 2000 - kukuk@suse.de + +- Fix again path to perl + +------------------------------------------------------------------- +Thu Nov 30 17:10:01 CET 2000 - pblaha@suse.cz + +- remove g3topbm and pbmtog3 for conflict with g3utils + +------------------------------------------------------------------- +Tue Nov 28 11:35:39 CET 2000 - kukuk@suse.de + +- Use /usr/bin/perl + +------------------------------------------------------------------- +Tue Nov 28 10:11:44 CET 2000 - pblaha@suse.cz + +- remove hpcdtoppm because conflict with photocd + +------------------------------------------------------------------- +Mon Oct 2 18:11:17 CEST 2000 - pblaha@suse.cz + +- update to 9.8 and rename libnetpb to libnetpbm + +------------------------------------------------------------------- +Fri Sep 29 01:24:47 CEST 2000 - ro@suse.de + +- fixed Makefile deps + +------------------------------------------------------------------- +Mon Jul 10 15:32:37 CEST 2000 - bubnikv@suse.cz + +- fixed pbmtog3 to use fixed width of fax image (standard), added + switch to allow usage of source image width +- updated man page of pbmtog3 +- changed URLs of home page and source file + +------------------------------------------------------------------- +Tue Jun 20 12:15:57 CEST 2000 - nadvornik@suse.cz + +- added shhopt.h, libshhopt.* + +------------------------------------------------------------------- +Fri May 26 16:11:40 CEST 2000 - bubnikv@suse.cz + +- sorted + +------------------------------------------------------------------- +Fri May 19 16:43:31 CEST 2000 - nadvornik@suse.cz + +- fixed Imakefile + +------------------------------------------------------------------- +Tue May 16 12:09:10 CEST 2000 - nadvornik@suse.cz + +- update to 8.4 +- added BuildRoot + +------------------------------------------------------------------- +Fri May 12 13:47:13 CEST 2000 - schwab@suse.de + +- pbmplus.h: fix linux configuration. + +------------------------------------------------------------------- +Tue Feb 29 16:23:26 CET 2000 - kukuk@suse.de + +- Let ldconfig create correct links for shared libraries and add + them to file list + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Thu Jan 14 00:25:12 MET 1999 - ro@suse.de + +- pbmplus.h: don't redeclare write on alpha + +------------------------------------------------------------------- +Wed Jun 17 16:33:08 MEST 1998 - ro@suse.de + +- patched to build for libc5 and glibc + +------------------------------------------------------------------- +Thu May 14 14:25:59 MEST 1998 - ro@suse.de + +- added patch to build pbmtosff from Christian Lademann + +------------------------------------------------------------------- +Tue May 12 18:21:56 MEST 1998 - ro@suse.de + +- extracted package from libgr / build from own sources diff --git a/netpbm.spec b/netpbm.spec new file mode 100644 index 0000000..1450a9c --- /dev/null +++ b/netpbm.spec @@ -0,0 +1,190 @@ +# +# spec file for package netpbm +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define debug_build 0 +%define asan_build 0 +%define ubsan_build 0 +%define libmaj 11 +%define libmin 105 +%define libver %{libmaj}.%{libmin} +Name: netpbm +Version: 11.5.2 +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 +Group: Productivity/Graphics/Convertors +URL: http://netpbm.sourceforge.net/ +Source: netpbm-%{version}-nohpcdtoppm-noppmtompeg.tar.bz2 +Source1: netpbm-%{version}-documentation.tar.bz2 +Source2: baselibs.conf +Source3: prepare-src-tarball.sh +# SUSE specific +Patch0: %{name}-make.patch +# neccessary for running with ASAN +Patch2: %{name}-security-code.patch +Patch3: %{name}-security-scripts.patch +Patch4: %{name}-gcc-warnings.patch +Patch5: makeman-py3.patch +# bsc#1144255 disable jpeg2k support due to removal of jasper +Patch8: netpbm-disable-jasper.patch +# CVE-2017-5849 [bsc#1022790], CVE-2017-5849 [bsc#1022791] +Patch9: netpbm-use-byrow-when-needed.patch +BuildRequires: flex +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: libtiff-devel +BuildRequires: libxml2-devel +BuildRequires: pkgconfig +# needed for the makeman +BuildRequires: python3-base +BuildRequires: pkgconfig(x11) +Provides: pbmplus + +%description +These are the Portable Bitmap Plus Utilities. + +This package provides tools for graphics conversion. Using these +tools, images can be converted from virtually any format into any +other format. A few of the supported formats include: GIF, +PC-Paintbrush, IFF ILBM, Gould Scanner file, MTV ray tracer, Atari +Degas .pi1 and .pi3, Macintosh PICT, HP Paintjet file, QRT raytracer, +AUTOCAD slide, Atari Spectrum (compressed and uncompressed), Andrew +Toolkit raster object, and many more. On top of that, man pages are +included for all tools. + +%package -n libnetpbm%{libmaj} +Summary: Libraries for the NetPBM (NetPortableBitmap) Graphic Formats +Group: System/Libraries +Provides: libnetpbm = %{version} +Obsoletes: libnetpbm < %{version} + +%description -n libnetpbm%{libmaj} +These are the libs for the netpbm graphic formats. The tools can be +found in the netpbm package. The sources are contained in the netpbm +source package. + +%package -n libnetpbm-devel +Summary: Header files for the NetPBM libraries +Group: Development/Libraries/C and C++ +Requires: libnetpbm%{libmaj} = %{version} + +%description -n libnetpbm-devel +These are the libs for the netpbm graphic formats. The tools can be +found in the netpbm package. The sources are contained in the netpbm +source package. + +%prep +%setup -q -D -a 1 +%autopatch -p1 +mkdir pnmtopalm # for %%doc pnmtopalm +cp -p converter/other/pnmtopalm/{LICENSE,README} pnmtopalm + +%build +# netpbm has _interactive_ configure perl script +cp config.mk.in config.mk # recomended by upstream, see doc/INSTALL +sed -i "s:STATICLIB_TOO = y:STATICLIB_TOO = n:" config.mk +# following two added 10.66.0, reported upstream +# recipe for target 'converter/install.manweb' failed +echo 'install.manweb:' >> converter/ppm/hpcdtoppm/Makefile +# dtto for ppmtompeg +echo 'install.manweb:' >> converter/ppm/ppmtompeg/Makefile +export CFLAGS="%{optflags} -flax-vector-conversions -Wno-return-type" +%if %{debug_build} +export CFLAGS="$CFLAGS -O0" +%endif +%if %{asan_build} +export CFLAGS="$CFLAGS -fsanitize=address -fno-sanitize-recover=all" +export LDFLAGS="$LDFLAGS -fsanitize=address" +%endif +%if %{ubsan_build} +export CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover=all" +export LDFLAGS="$LDFLAGS -fsanitize=undefined" +%endif +make %{?_smp_mflags} CFLAGS="$CFLAGS" +rm doc/INSTALL +# +# convert html to man pages +cd netpbm.sourceforge.net/doc + ../../buildtools/makeman *.html +for i in 1 3 5 ; do + mkdir -p ../../man/man${i} + mv *.${i} ../../man/man${i} +done + +%install +# netpbm has _interactive_ install perl script, see doc/INSTALL +make pkgdir=`pwd`/package package STRIPFLAG= +# +mkdir -p %{buildroot}%{_prefix}/{bin,include,%{_lib},share/man,share/%{name}} +cp -pd package/bin/* %{buildroot}%{_bindir} +cp -pd package/lib/*.so* %{buildroot}%{_libdir} +ln -s libnetpbm.so.%{libver} %{buildroot}%{_libdir}/libnetpbm.so +cp -prd package/include/netpbm %{buildroot}%{_includedir} +cp -prd man/* %{buildroot}%{_mandir} +install -m 644 converter/other/pnmtopalm/*.map \ + %{buildroot}%{_datadir}/%{name} +rm %{buildroot}%{_bindir}/g3topbm # conflict with g3utils +rm %{buildroot}%{_bindir}/pstopnm # disable due security reasons, e. g. [bsc#1105592] + +%post -n libnetpbm%{libmaj} -p /sbin/ldconfig +%postun -n libnetpbm%{libmaj} -p /sbin/ldconfig + +%check +%if %{asan_build} +export LSAN_OPTIONS="detect_leaks=0" +%endif +%if %{ubsan_build} +export UBSAN_OPTIONS="print_stacktrace=1" +%endif +# do not run unneccesary tests +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 +# $ 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 +# 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 + +%files +%doc README doc/* netpbm.sourceforge.net/doc +%doc pnmtopalm/ +%{_mandir}/man1/*%{ext_man} +%{_mandir}/man5/*%{ext_man} +%{_bindir}/* +%{_datadir}/%{name} + +%files -n libnetpbm%{libmaj} +%{_libdir}/lib*.so.%{libmaj} +%{_libdir}/lib*.so.%{libver} + +%files -n libnetpbm-devel +%{_includedir}/%{name} +%{_libdir}/lib*.so +%{_mandir}/man3/*%{ext_man} + +%changelog diff --git a/prepare-src-tarball.sh b/prepare-src-tarball.sh new file mode 100644 index 0000000..43d813a --- /dev/null +++ b/prepare-src-tarball.sh @@ -0,0 +1,38 @@ +#!/bin/sh -x + +#This script is used to create netpbm-$VER-nohpcdtoppm-nojbig.tar.bz2 +#from upstream svn, http://sourceforge.net/projects/netpbm/ + + +rm -rf REMOVE +mkdir REMOVE +cd REMOVE +svn checkout https://svn.code.sf.net/p/netpbm/code/advanced/ netpbm +VER=`echo \`cut -f2 -d= netpbm*/version.mk \`|sed -e "s| |.|g"` +mv netpbm* netpbm-$VER + +find . -name ".svn" -exec rm -rf {} \; + +cd netpbm*/converter/ppm/hpcdtoppm || exit 1 +rm -rf * +echo all: >> Makefile +echo install.bin: >> Makefile +echo install.man: >> Makefile +echo install.data: >> Makefile +echo clean: >> Makefile +cd ../../../.. + +cd netpbm*/converter/ppm/ppmtompeg || exit 1 +rm -rf * +echo all: >> Makefile +echo install.bin: >> Makefile +echo install.man: >> Makefile +echo install.data: >> Makefile +echo clean: >> Makefile +cd ../../../.. + +tar cjf ../netpbm-$VER-nohpcdtoppm-noppmtompeg.tar.bz2 * + +wget -m netpbm.sourceforge.net +tar cjf ../netpbm-$VER-documentation.tar.bz2 netpbm.sourceforge.net +