From 1ab173519dfaf6b3b30c993812421a5c348674c7 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jun 25 2013 01:47:08 +0000 Subject: import netpbm-10.61.02-5.el7.src.rpm --- diff --git a/.netpbm.metadata b/.netpbm.metadata new file mode 100644 index 0000000..e44f061 --- /dev/null +++ b/.netpbm.metadata @@ -0,0 +1 @@ +4b6239cd9564fbcebb0e6d87a1ef3c2ecfaa5a14 SOURCES/netpbm-10.61.02.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/netpbm-CAN-2005-2471.patch b/SOURCES/netpbm-CAN-2005-2471.patch new file mode 100644 index 0000000..ee9935f --- /dev/null +++ b/SOURCES/netpbm-CAN-2005-2471.patch @@ -0,0 +1,17 @@ +diff -up netpbm-10.56.03/converter/other/pstopnm.c.CAN-2005-2471 netpbm-10.56.03/converter/other/pstopnm.c +--- netpbm-10.56.03/converter/other/pstopnm.c.CAN-2005-2471 2011-11-09 09:18:00.000000000 +0100 ++++ netpbm-10.56.03/converter/other/pstopnm.c 2011-11-11 11:43:51.827409226 +0100 +@@ -747,11 +747,11 @@ execGhostscript(int const input + ghostscriptProg, arg0, + deviceopt, outfileopt, gopt, ropt, textalphabitsopt, + "-q", "-dNOPAUSE", +- "-dSAFER", "-"); ++ "-dPARANOIDSAFER", "-"); + } + + execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt, "-q", +- "-dNOPAUSE", "-dSAFER", "-", NULL); ++ "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL); + + pm_error("execl() of Ghostscript ('%s') failed, errno=%d (%s)", + ghostscriptProg, errno, strerror(errno)); diff --git a/SOURCES/netpbm-bmptopnm.patch b/SOURCES/netpbm-bmptopnm.patch new file mode 100644 index 0000000..9095427 --- /dev/null +++ b/SOURCES/netpbm-bmptopnm.patch @@ -0,0 +1,11 @@ +--- netpbm-10.35/converter/other/bmptopnm.c.bmptopnm 2007-01-29 13:08:46.000000000 +0100 ++++ netpbm-10.35/converter/other/bmptopnm.c 2007-01-29 13:32:21.000000000 +0100 +@@ -1262,7 +1262,7 @@ readBmp(FILE * const ifP, + xel ** const colormapP, + bool const verbose) { + +- xel * colormap; /* malloc'ed */ ++ xel * colormap = NULL; /* malloc'ed */ + unsigned int pos; + /* Current byte position in the BMP file */ + diff --git a/SOURCES/netpbm-cmuwtopbm.patch b/SOURCES/netpbm-cmuwtopbm.patch new file mode 100644 index 0000000..f5b328b --- /dev/null +++ b/SOURCES/netpbm-cmuwtopbm.patch @@ -0,0 +1,21 @@ +diff -up netpbm-10.61.01/converter/pbm/cmuwmtopbm.c.cmuwtopbmfix netpbm-10.61.01/converter/pbm/cmuwmtopbm.c +--- netpbm-10.61.01/converter/pbm/cmuwmtopbm.c.cmuwtopbmfix 2013-01-02 18:39:57.000000000 +0100 ++++ netpbm-10.61.01/converter/pbm/cmuwmtopbm.c 2013-01-03 05:41:36.024984241 +0100 +@@ -18,7 +18,7 @@ + This program does not check the pad bits at the end of each row. + */ + +- ++#include + #include "pbm.h" + + /*-------------------------- +@@ -42,7 +42,7 @@ readCmuwmHeader(FILE * const ifP + "CMU window manager header EOF / read error"; + uint32_t const cmuwmMagic = 0xf10040bb; + +- long l; ++ uint32_t l; + short s; + int rc; + diff --git a/SOURCES/netpbm-compare-same-images.patch b/SOURCES/netpbm-compare-same-images.patch new file mode 100644 index 0000000..c629c4c --- /dev/null +++ b/SOURCES/netpbm-compare-same-images.patch @@ -0,0 +1,23 @@ +diff --git a/analyzer/pnmpsnr.c b/analyzer/pnmpsnr.c +index ce2708b..b04316c 100644 +--- a/analyzer/pnmpsnr.c ++++ b/analyzer/pnmpsnr.c +@@ -55,14 +55,14 @@ validateInput(struct pam const pam1, + "maxval of one of them.", + (unsigned int) pam1.maxval, (unsigned int) pam2.maxval); + +- if (streq(pam1.tuple_type, pam2.tuple_type)) ++ if (!streq(pam1.tuple_type, pam2.tuple_type)) + pm_error("images are not of the same type. The tuple types are " + "'%s' and '%s', respectively.", + pam1.tuple_type, pam2.tuple_type); + +- if (streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) && +- streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) && +- streq(pam1.tuple_type, PAM_PPM_TUPLETYPE)) ++ if (!streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) && ++ !streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) && ++ !streq(pam1.tuple_type, PAM_PPM_TUPLETYPE)) + pm_error("Images are not of a PNM type. Tuple type is '%s'", + pam1.tuple_type); + } diff --git a/SOURCES/netpbm-docfix.patch b/SOURCES/netpbm-docfix.patch new file mode 100644 index 0000000..a88c65b --- /dev/null +++ b/SOURCES/netpbm-docfix.patch @@ -0,0 +1,124 @@ +diff -up netpbm-10.35.58/converter/pbm/pbmtoepson.c.docfix netpbm-10.35.58/converter/pbm/pbmtoepson.c +--- netpbm-10.35.58/converter/pbm/pbmtoepson.c.docfix 2009-01-19 09:24:03.000000000 +0100 ++++ netpbm-10.35.58/converter/pbm/pbmtoepson.c 2009-04-15 09:10:52.000000000 +0200 +@@ -74,7 +74,7 @@ parseCommandLine(int arg + &dpiSpec, 0); + OPTENT3(0, "adjacent", OPT_FLAG, NULL, + &adjacentSpec, 0); +- OPTENT3(0, "nonadjacent", OPT_FLAG, NULL, ++ OPTENT3(0, "noadjacent", OPT_FLAG, NULL, + &nonadjacentSpec, 0); + + opt.opt_table = option_def; +diff -up netpbm-10.35.58/userguide/cameratopam.html.docfix netpbm-10.35.58/userguide/cameratopam.html +--- netpbm-10.35.58/userguide/cameratopam.html.docfix 2009-01-19 09:24:18.000000000 +0100 ++++ netpbm-10.35.58/userguide/cameratopam.html 2009-04-15 09:16:16.000000000 +0200 +@@ -25,10 +25,10 @@ cameratopam - convert raw camera image t + [-balance_camera] + [-red_scale=float] + [-blue_scale=float] +-[-brightness=fraction] ++[-bright=fraction] + [-no_clip_color] + [-rgb] +-[-secondary] ++[-use_secondary] + [-linear] + [-verbose] + +@@ -106,7 +106,7 @@ the default. +
Further adjust the color balance by multiplying the red and blue + channels by these values. Both default to 1.0. + +-
-brightness=float ++
-bright=float + +
Change the output brightness. Default is 1.0. + +@@ -114,14 +114,14 @@ channels by these values. Both default + +
By default, cameratoapm clips all colors to prevent pink + hues in the highlights. Combine this option with +--brightness=0.25 to leave the image data completely unclipped. ++-bright=0.25 to leave the image data completely unclipped. + +
-rgb + +
Write raw camera colors to the output file. By default, + cameratoapm converts to sRGB colorspace. + +-
-secondary ++
-use_secondary + +
For cameras based on the Fuji Super CCD SR, this option causes + cameratopam to use the secondary sensors, in effect +diff -up netpbm-10.35.58/userguide/fiascotopnm.html.docfix netpbm-10.35.58/userguide/fiascotopnm.html +--- netpbm-10.35.58/userguide/fiascotopnm.html.docfix 2009-01-19 09:24:18.000000000 +0100 ++++ netpbm-10.35.58/userguide/fiascotopnm.html 2009-04-15 09:10:52.000000000 +0200 +@@ -51,7 +51,7 @@ the output file(s) are written to the fi + this list. Otherwise, the current directory is used to store the + output file(s). + +-
-z, --fast ++
-r, --fast +
+ Decompress images in the 4:2:0 format; i.e., each chroma channel is + decompressed to an image of halved width and height. Use this option +@@ -83,7 +83,7 @@ given amount N. N is 1 (mi + is 70. When N=0, then the smoothing amount specified in the + FIASCO file is used (defined by the FIASCO coder). + +-
-F N, --fps=N ++
-F N, --framerate=N +
+ Set number of frames per second to N. When using this option, + the frame rate specified in the FIASCO file is overridden. +@@ -109,13 +109,9 @@ following methods (in the specified orde +
  • --config=name + + +-
    -h, --info ++
    -h, --help +
    +-Print brief help, then exit. +- +-
    -H, --help +-
    +-Print detailed help, then exit. ++Print help, then exit. + + + +diff -up netpbm-10.47.12/userguide/pamperspective.html.docfix netpbm-10.47.12/userguide/pamperspective.html +--- netpbm-10.47.12/userguide/pamperspective.html.docfix 2010-04-27 15:48:09.000000000 +0200 ++++ netpbm-10.47.12/userguide/pamperspective.html 2010-05-03 14:16:26.064266675 +0200 +@@ -220,7 +220,7 @@ default rectangle as the "frame.&qu + a rectangle the axes of which are parallel to those of the frame. + +

    The frame options are additive. All the parts of the image +-specified by either margin options, --include_frame, or ++specified by either margin options, --frame_include, or + --include (or their defaults) are in the visible part. The + visible part is the smallest possible rectangle that contains the + parts specified those three ways. +diff -up netpbm-10.47.12/userguide/pbmtoepson.html.docfix netpbm-10.47.12/userguide/pbmtoepson.html +--- netpbm-10.47.12/userguide/pbmtoepson.html.docfix 2010-04-27 15:48:09.000000000 +0200 ++++ netpbm-10.47.12/userguide/pbmtoepson.html 2010-05-03 14:34:03.571141020 +0200 +@@ -18,7 +18,7 @@ pbmtoepson - convert a PBM image into Ep + [-dpi=n] + [-protocol={escp9|escp}] + [-adjacent] +-[-nonadjacent] ++[-noadjacent] + + [pbmfile] + +@@ -74,7 +74,7 @@ print density for you consistent with yo +

    This option was new in Netpbm 10.23 (July 2004). + +

    -adjacent +-
    -nonadjacent ++
    -noadjacent + +
    These options determine whether the output uses "adjacent dot + printing" or not, whatever that is. diff --git a/SOURCES/netpbm-fiasco-overflow.patch b/SOURCES/netpbm-fiasco-overflow.patch new file mode 100644 index 0000000..850dbc3 --- /dev/null +++ b/SOURCES/netpbm-fiasco-overflow.patch @@ -0,0 +1,12 @@ +diff -up netpbm-10.47.09/converter/other/fiasco/lib/image.h.fiasco-overflow netpbm-10.47.09/converter/other/fiasco/lib/image.h +--- netpbm-10.47.09/converter/other/fiasco/lib/image.h.fiasco-overflow 2010-01-25 09:00:48.000000000 +0100 ++++ netpbm-10.47.09/converter/other/fiasco/lib/image.h 2010-01-27 10:29:48.000000000 +0100 +@@ -29,7 +29,7 @@ typedef struct image + * Image data + */ + { +- char id [7]; ++ char id [8]; + unsigned reference_count; + unsigned width; /* Width of the image */ + unsigned height; /* Height of the image */ diff --git a/SOURCES/netpbm-gcc4.patch b/SOURCES/netpbm-gcc4.patch new file mode 100644 index 0000000..3f51826 --- /dev/null +++ b/SOURCES/netpbm-gcc4.patch @@ -0,0 +1,22 @@ +diff -up netpbm-10.58.01/lib/pm.h.gcc4 netpbm-10.58.01/lib/pm.h +--- netpbm-10.58.01/lib/pm.h.gcc4 2012-04-09 19:08:08.885137097 +0200 ++++ netpbm-10.58.01/lib/pm.h 2012-04-09 19:08:08.894136984 +0200 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -up netpbm-10.58.01/urt/rle.h.gcc4 netpbm-10.58.01/urt/rle.h +--- netpbm-10.58.01/urt/rle.h.gcc4 2012-04-09 19:08:08.000000000 +0200 ++++ netpbm-10.58.01/urt/rle.h 2012-04-09 19:08:39.137758887 +0200 +@@ -34,6 +34,7 @@ + #define RLE_H + + #include /* Declare FILE. */ ++#include + + enum rle_dispatch { + NO_DISPATCH = -1, diff --git a/SOURCES/netpbm-glibc.patch b/SOURCES/netpbm-glibc.patch new file mode 100644 index 0000000..4ae71e8 --- /dev/null +++ b/SOURCES/netpbm-glibc.patch @@ -0,0 +1,13 @@ +--- netpbm-10.35/converter/other/pnmtotiffcmyk.c.glibc 2006-09-18 12:20:06.000000000 +0200 ++++ netpbm-10.35/converter/other/pnmtotiffcmyk.c 2007-08-23 09:18:30.000000000 +0200 +@@ -974,8 +974,8 @@ int main( int argc, char **argv ) { + + if ( (err = parseOpts( argc, argv, rt )) ) goto exit ; + +- if ( (err = rt->in->open( rt->in, rt )) ) goto exit ; +- if ( (err = rt->out->open( rt->out, rt )) ) goto exit ; ++ if ( (err = (rt->in->open)( rt->in, rt )) ) goto exit ; ++ if ( (err = (rt->out->open)( rt->out, rt )) ) goto exit ; + + while ( rt->in->hasMore( rt->in ) ) { + if ( (err = rt->in->next( rt->in, &r, &g, &b )) ) goto exit ; diff --git a/SOURCES/netpbm-manfix.patch b/SOURCES/netpbm-manfix.patch new file mode 100644 index 0000000..d459db4 --- /dev/null +++ b/SOURCES/netpbm-manfix.patch @@ -0,0 +1,205 @@ +diff -up netpbm-10.59.03/userguide/avstopam.html.manfix netpbm-10.59.03/userguide/avstopam.html +--- netpbm-10.59.03/userguide/avstopam.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/avstopam.html 2012-09-25 10:47:22.756174816 +0200 +@@ -1,8 +1,7 @@ +- +- ++ ++ + + Avstopam User Manual +- + + + +diff -up netpbm-10.59.03/userguide/escp2topbm.html.manfix netpbm-10.59.03/userguide/escp2topbm.html +--- netpbm-10.59.03/userguide/escp2topbm.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/escp2topbm.html 2012-09-25 10:47:22.756174816 +0200 +@@ -2,10 +2,11 @@ + Escp2topbm User Manual + +

    escp2topbm

    +-Created: 1 August 2003 ++Updated: 1 August 2003 +
    + Table Of Contents + ++

    NAME

    + escp2topbm - convert an ESC/P2 printer file to a PBM image + +

    SYNOPSIS

    +diff -up netpbm-10.59.03/userguide/faxformat.html.manfix netpbm-10.59.03/userguide/faxformat.html +--- netpbm-10.59.03/userguide/faxformat.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/faxformat.html 2012-09-25 10:47:22.756174816 +0200 +@@ -5,10 +5,12 @@ + Updated: 03 December 2008 +
    + ++

    SYNOPSIS

    +

    This page, part of the Netpbm user's guide, + describes FAX formats in relation to Netpbm facilities. + + ++

    DESCRIPTION

    +

    The ITU (formerly CCITT) publishes standards for operation of fax machines + (the idea is to provide a way to be sure that a fax machine is able to receive + a fax sent by another). These standards incidentally specify graphics file +diff -up netpbm-10.59.03/userguide/pampaintspill.html.manfix netpbm-10.59.03/userguide/pampaintspill.html +--- netpbm-10.59.03/userguide/pampaintspill.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pampaintspill.html 2012-09-25 10:47:22.757174803 +0200 +@@ -1,8 +1,7 @@ + +- ++ + + Pampaintspill User Manual +- + + + +@@ -11,6 +10,7 @@ + +

    Table Of Contents

    + ++

    NAME

    +

    pampaintspill - smoothly spill colors into the background

    + +

    SYNOPSIS

    +diff -up netpbm-10.59.03/userguide/pamrecolor.html.manfix netpbm-10.59.03/userguide/pamrecolor.html +--- netpbm-10.59.03/userguide/pamrecolor.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pamrecolor.html 2012-09-25 10:47:22.757174803 +0200 +@@ -1,8 +1,7 @@ +- ++ + + + Pamrecolor User Manual +- + + + +@@ -11,7 +10,7 @@ + +

    Updated: 31 July 2010

    + +-

    Table Of Contents

    ++

    Table Of Contents

    + + +

    NAME

    +diff -up netpbm-10.59.03/userguide/pamsistoaglyph.html.manfix netpbm-10.59.03/userguide/pamsistoaglyph.html +--- netpbm-10.59.03/userguide/pamsistoaglyph.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pamsistoaglyph.html 2012-09-25 10:47:22.758174790 +0200 +@@ -1,8 +1,7 @@ + +- ++ + + Pamsistoaglyph User Manual +- + + + +diff -up netpbm-10.59.03/userguide/pamtoavs.html.manfix netpbm-10.59.03/userguide/pamtoavs.html +--- netpbm-10.59.03/userguide/pamtoavs.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pamtoavs.html 2012-09-25 10:47:22.759174777 +0200 +@@ -1,8 +1,7 @@ +- +- ++ ++ + + Pamtoavs User Manual +- + + + +diff -up netpbm-10.59.03/userguide/pamtooctaveimg.html.manfix netpbm-10.59.03/userguide/pamtooctaveimg.html +--- netpbm-10.59.03/userguide/pamtooctaveimg.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pamtooctaveimg.html 2012-09-25 10:47:22.759174777 +0200 +@@ -1,8 +1,7 @@ +- +- ++ ++ + + Pamtooctaveimg User Manual +- + + + +diff -up netpbm-10.59.03/userguide/pnmflip.html.manfix netpbm-10.59.03/userguide/pnmflip.html +--- netpbm-10.59.03/userguide/pnmflip.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pnmflip.html 2012-09-25 10:47:22.760174765 +0200 +@@ -4,9 +4,11 @@ + +

    pnmflip

    +
    ++

    NAME

    +

    pnmflip was replaced in Netpbm 10.13 (December 2002) by + pamflip. + ++

    DESCRIPTION

    +

    pamflip is mostly backward compatible with pnmflip, + but works on PAM images too. + +diff -up netpbm-10.59.03/userguide/pnmmercator.html.manfix netpbm-10.59.03/userguide/pnmmercator.html +--- netpbm-10.59.03/userguide/pnmmercator.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pnmmercator.html 2012-09-25 10:47:22.760174765 +0200 +@@ -1,7 +1,6 @@ +- ++ + + +- + PnmMercator User Manual + + +diff -up netpbm-10.59.03/userguide/pnmtotiff.html.manfix netpbm-10.59.03/userguide/pnmtotiff.html +--- netpbm-10.59.03/userguide/pnmtotiff.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/pnmtotiff.html 2012-09-25 10:47:22.760174765 +0200 +@@ -1,5 +1,4 @@ + +- + + pnmtotiff + +diff -up netpbm-10.59.03/userguide/ppmtogif.html.manfix netpbm-10.59.03/userguide/ppmtogif.html +--- netpbm-10.59.03/userguide/ppmtogif.html.manfix 2012-09-22 03:46:15.000000000 +0200 ++++ netpbm-10.59.03/userguide/ppmtogif.html 2012-09-25 10:47:22.761174753 +0200 +@@ -4,11 +4,14 @@ + +

    ppmtogif

    +
    ++

    NAME

    +

    ppmtogif was replaced in Netpbm 10.37 (December 2006) by + pamtogif. + ++

    SYNOPSIS

    +

    pamtogif is mostly backward compatible with ppmtogif. + ++

    DESCRIPTION

    +

    One way pamtogif is not backward compatible with ppmtogif + is that to specify a transparency (alpha) mask with ppmtogif, you + supply the transparency as a separate pseudo-PGM image and use the +diff -up netpbm-10.61.02/userguide/pamstereogram.html.manfix netpbm-10.61.02/userguide/pamstereogram.html +--- netpbm-10.61.02/userguide/pamstereogram.html.manfix 2013-02-20 07:32:26.000000000 +0100 ++++ netpbm-10.61.02/userguide/pamstereogram.html 2013-02-20 07:40:35.071099535 +0100 +@@ -1,5 +1,5 @@ +- +- ++ ++ + + Pamstereogram User Manual + +@@ -10,8 +10,7 @@ + +

    Updated:30 December 2012

    + +-

    Table Of Contents

    +- ++

    Table Of Contents

    + +

    NAME

    + diff --git a/SOURCES/netpbm-manual-pages.patch b/SOURCES/netpbm-manual-pages.patch new file mode 100644 index 0000000..79f0992 --- /dev/null +++ b/SOURCES/netpbm-manual-pages.patch @@ -0,0 +1,1646 @@ +diff --git a/userguide/cameratopam.html b/userguide/cameratopam.html +index 7a6391e..89f6939 100644 +--- a/userguide/cameratopam.html ++++ b/userguide/cameratopam.html +@@ -163,7 +163,7 @@ means. + href="http://www.cybercom.net/~dcoffin/dcraw/">dcraw by Dave + Coffin, by Bryan Henderson in April 2005. Bryan replaced the part + that generates the Netpbm output image and removed the Adobe Photoshop +-output function. Bryan changed the command syntax and and made other ++output function. Bryan changed the command syntax and made other + small changes to make the program consistent with Netpbm. He also + split the source code into manageable pieces (dcraw has a + single 5000 line source file). +diff --git a/userguide/fiascotopnm.html b/userguide/fiascotopnm.html +index 2cd4f01..f1f1b17 100644 +--- a/userguide/fiascotopnm.html ++++ b/userguide/fiascotopnm.html +@@ -76,7 +76,7 @@ Set magnification of the decompressed image. Positive values enlarge + and negative values reduce the image width and height by a factor of + 2^|N|. + +-
    -s N, --smooth=N ++
    -s N, --smoothing=N +
    + Smooth decompressed image(s) along the partitioning borders by the + given amount N. N is 1 (minimum) to 100 (maximum); default +@@ -88,6 +88,10 @@ FIASCO file is used (defined by the FIASCO coder). + Set number of frames per second to N. When using this option, + the frame rate specified in the FIASCO file is overridden. + ++
    --verbose=N ++
    ++Set verbose of fiascotopnm to N. ++ +
    -v, --version +
    + Print fiascotopnm version number, then exit. +diff --git a/userguide/pamdepth.html b/userguide/pamdepth.html +index 1a2b5fd..c188e44 100644 +--- a/userguide/pamdepth.html ++++ b/userguide/pamdepth.html +@@ -52,7 +52,7 @@ files before April 2000. + pnmdepth, by Jef Poskanzer. pamdepth is backward compatible + with pnmdepth and adds the ability to process arbitrary PAM images + and the ability to process multi-image input streams. pnmdepth +-handled only PNM images and ignored all but the the first in any stream. ++handled only PNM images and ignored all but the first in any stream. + +
    +

    Table Of Contents

    +diff --git a/userguide/pamdice.html b/userguide/pamdice.html +index 0659e15..9053113 100644 +--- a/userguide/pamdice.html ++++ b/userguide/pamdice.html +@@ -139,7 +139,7 @@ in each direction. + pgmslice, + ppmglobe + pnm +-pnm ++pam + +
    +

    Table Of Contents

    +diff --git a/userguide/pamstereogram.html b/userguide/pamstereogram.html +index c337547..652b887 100644 +--- a/userguide/pamstereogram.html ++++ b/userguide/pamstereogram.html +@@ -319,7 +319,7 @@ be. Lower (darker) numbers mean further from the eye. + +

    Input Images

    + +-

    pamstereogram pays no attention the the image's tuple ++

    pamstereogram pays no attention the image's tuple + type and ignores all planes other than plane 0.

    + +

    Like any Netpbm program, pamstereogram will accept PNM +diff --git a/userguide/pamtofits.html b/userguide/pamtofits.html +index 445b326..0ecc806 100644 +--- a/userguide/pamtofits.html ++++ b/userguide/pamtofits.html +@@ -54,7 +54,7 @@ approximation. +

    Pixel Order

    + +

    The FITS specification does not specify which data in the file corresponds +-to which pixel in the image (i.e. which bytes are the the top left pixel, ++to which pixel in the image (i.e. which bytes are the top left pixel, + etc.). Netpbm uses the common sense, most popular arrangement: row major, top + to bottom, left to right. That means in a 10 wide by 20 high image, the first + 10 pixels in the file are the top row and the last 10 are the bottom row. +diff --git a/userguide/pamtojpeg2k.html b/userguide/pamtojpeg2k.html +index 06b6113..046d740 100644 +--- a/userguide/pamtojpeg2k.html ++++ b/userguide/pamtojpeg2k.html +@@ -181,7 +181,7 @@ its goal is similar to JPEG. It has two main differences from JPEG. +

    One difference is that it does a much better job on most images of + throwing out information in order to achieve a smaller output. That + means when you reconstruct the image from the resulting compressed +-file, it looks a lot closer to the image you started with with ++file, it looks a lot closer to the image you started with + JPEG-2000 than with JPEG, for the same compressed file size. Or, looked + at another way, with JPEG-2000 you get a much smaller file than with + JPEG for the same image quality. +diff --git a/userguide/pamtotiff.html b/userguide/pamtotiff.html +index f07d227..c7a48a0 100644 +--- a/userguide/pamtotiff.html ++++ b/userguide/pamtotiff.html +@@ -124,7 +124,7 @@ format it produces are therefore controlled by that library. +

    By default, pamtotiff creates a TIFF file with no + compression. This is your best bet most of the time. If you want to + try another compression scheme or tweak some of the other even more +-obscure output options, there are a number of options which which to ++obscure output options, there are a number of options which to + play. + +

    Before Netpbm 8.4 (April 2000), the default was to use LZW compression. +diff --git a/userguide/pamtouil.html b/userguide/pamtouil.html +index 1074119..6c2356b 100644 +--- a/userguide/pamtouil.html ++++ b/userguide/pamtouil.html +@@ -57,7 +57,7 @@ in the RGB database. +   +

    SEE ALSO

    + +-pam ++pamstack + pam + ppm + +diff --git a/userguide/pamundice.html b/userguide/pamundice.html +index 2b789b4..bf366d6 100644 +--- a/userguide/pamundice.html ++++ b/userguide/pamundice.html +@@ -208,7 +208,7 @@ clips the bottom edge of each image before joining it to the one below. + pnmindex, + pnmtile, + pnm +-pnm ++pam + +
    +

    Table Of Contents

    +diff --git a/userguide/pbm.html b/userguide/pbm.html +index 63dfa40..7db4886 100644 +--- a/userguide/pbm.html ++++ b/userguide/pbm.html +@@ -136,7 +136,7 @@ P1 + accepting anything that looks remotely like a bitmap. + +

    All characters referred to herein are encoded in ASCII. +-"newline" refers the the character known in ASCII as Line ++"newline" refers the character known in ASCII as Line + Feed or LF. A "white space" character is space, CR, LF, + TAB, VT, or FF (I.e. what the ANSI standard C isspace() function + calls white space). +diff --git a/userguide/pbmtolj.html b/userguide/pbmtolj.html +index ce7e9bb..6da4555 100644 +--- a/userguide/pbmtolj.html ++++ b/userguide/pbmtolj.html +@@ -83,7 +83,7 @@ and end of the output file. + +

    -copies + +-
    Specifies the the number of copies. The default is 1. This option ++
    Specifies the number of copies. The default is 1. This option + controls the "number of copies" printer control; + pbmtolj generates only one copy of the image. + +diff --git a/userguide/pgm.html b/userguide/pgm.html +index d75c9ef..7df1abc 100644 +--- a/userguide/pgm.html ++++ b/userguide/pgm.html +@@ -153,7 +153,7 @@ P2 + accepting anything that looks remotely like a PGM. + +

    All characters referred to herein are encoded in ASCII. +-"newline" refers the the character known in ASCII as Line ++"newline" refers the character known in ASCII as Line + Feed or LF. A "white space" character is space, CR, LF, + TAB, VT, or FF (I.e. what the ANSI standard C isspace() function + calls white space). +diff --git a/userguide/pngtopam.html b/userguide/pngtopam.html +index 8185843..09406ef 100644 +--- a/userguide/pngtopam.html ++++ b/userguide/pngtopam.html +@@ -269,7 +269,7 @@ change to the package in Netpbm's renaissance. It and pnmtopng + were simply copied from the + pnmtopng package by Greg Roelofs. Those were based on +-simpler reference applications by by Alexander Lehmann ++simpler reference applications by Alexander Lehmann + <alex@hal.rhein-main.de> and Willem van Schaik + <willem@schaik.com> and distributed with their PNG library. + +diff --git a/userguide/pnmnorm.html b/userguide/pnmnorm.html +index c4d2558..5d3ca49 100644 +--- a/userguide/pnmnorm.html ++++ b/userguide/pnmnorm.html +@@ -146,7 +146,7 @@ value 99 or the white value 101. + option. Sometimes, too much contrast is a bad thing. If your + intensities are all concentrated in the middle, -bpercent=2 and + -wpercent=1 might mean that an intensity of 60 gets stretched +-up to 100 and and intensity of 20 gets stretched down to zero, for a ++up to 100 and intensity of 20 gets stretched down to zero, for a + range expansion of 150% (from a range of 40 to a range of 100). That + much stretching means two adjacent pixels that used to differ in + intensity by 4 units now differ by 10, and that might be unsightly. +diff --git a/userguide/pnmtopalm.html b/userguide/pnmtopalm.html +index 94aa6ff..9ca9c0d 100644 +--- a/userguide/pnmtopalm.html ++++ b/userguide/pnmtopalm.html +@@ -164,7 +164,7 @@ the -colormap option, for much the same reason. + +

    -withdummy +
    +-This option tells pnmtopalm to put in the stream, after after ++This option tells pnmtopalm to put in the stream, after + the image, a dummy image header to introduce subsequent high density + images. + +diff --git a/userguide/ppm.html b/userguide/ppm.html +index c71aaa4..8e7a111 100644 +--- a/userguide/ppm.html ++++ b/userguide/ppm.html +@@ -158,7 +158,7 @@ P3 + accepting anything that looks remotely like a PPM image. + +

    All characters referred to herein are encoded in ASCII. +-"newline" refers the the character known in ASCII as Line ++"newline" refers the character known in ASCII as Line + Feed or LF. A "white space" character is space, CR, LF, + TAB, VT, or FF (I.e. what the ANSI standard C isspace() function + calls white space). +diff --git a/userguide/ppmtopj.html b/userguide/ppmtopj.html +index c07c1d9..b50be28 100644 +--- a/userguide/ppmtopj.html ++++ b/userguide/ppmtopj.html +@@ -61,7 +61,7 @@ You could convert your input to this format like this: + pnmremap -map 8color.pam testimg.pam | ppmtopj + + +-Or you could use use ++Or you could use +

    +     ppmdither -red 2 -green 2 -blue 2
    + 
    +diff --git a/userguide/qrttoppm.html b/userguide/qrttoppm.html +index b6bf976..112bf50 100644 +--- a/userguide/qrttoppm.html ++++ b/userguide/qrttoppm.html +@@ -22,7 +22,7 @@ qrttoppm - convert output from the QRT ray tracer to a PPM image + +

    This program is part of Netpbm. + +-

    qrttoppm reads a QRT file as input and and produces a PPM ++

    qrttoppm reads a QRT file as input and produces a PPM + image as output. + +   +diff --git a/userguide/sbigtopgm.html b/userguide/sbigtopgm.html +index 400bcaf..78f9454 100644 +--- a/userguide/sbigtopgm.html ++++ b/userguide/sbigtopgm.html +@@ -22,7 +22,7 @@ sbigtopgm - convert an SBIG CCDOPS file to PGM + +

    This program is part of Netpbm. + +-

    sbigtopgm reads an an image file in the native format used ++

    sbigtopgm reads an image file in the native format used + by the Santa Barbara Instrument Group (SBIG) astronomical CCD cameras, + and produces a PGM image as output. Additional information on SBIG + cameras and documentation of the file format is available at the Web +diff --git a/userguide/srftopam.html b/userguide/srftopam.html +index b27f133..c98586f 100644 +--- a/userguide/srftopam.html ++++ b/userguide/srftopam.html +@@ -30,7 +30,7 @@ + +

    This program is part of Netpbm.

    + +-

    srftopam reads a a SRF image file as input and produces a ++

    srftopam reads a SRF image file as input and produces a + multi-image stream of PAM images as output. + +

    This program performs the inverse of the conversion that pamtosrf +diff --git a/userguide/sunicontopnm.html b/userguide/sunicontopnm.html +index 6ccbcde..0290f7b 100644 +--- a/userguide/sunicontopnm.html ++++ b/userguide/sunicontopnm.html +@@ -54,7 +54,7 @@ mostly XPM files. + xbmtoppm, + infotopam, + pbm +-pbm ++pgm + +

    HISTORY

    + +diff --git a/userguide/xpmtoppm.html b/userguide/xpmtoppm.html +index c7c857b..f96b249 100644 +--- a/userguide/xpmtoppm.html ++++ b/userguide/xpmtoppm.html +@@ -46,7 +46,7 @@ alpha output to Standard Output and discards the image. + the alpha output file. + +

    xpmtoppm can't handle a line longer than 8K characters in +-the the XPM input. If an input line exceeds this limit, ++the XPM input. If an input line exceeds this limit, + xpmtoppm quits with an error message to that effect. Before + Netpbm 10.30 (October 2005), the limit was 2K. + +diff --git a/userguide/infotopam.html b/userguide/infotopam.html +index 9818c59..177f4d4 100644 +--- a/userguide/infotopam.html ++++ b/userguide/infotopam.html +@@ -110,7 +110,7 @@ using the -forcecolor option.

    +

    To override the colors, first specify how many colors to override using + -numcolors, then specify an (index color) pair for each color + you want to override, where index is a value from 0 to 3 and +- color the the new color for that index. Specify color as ++ color the new color for that index. Specify color as + described for the ppm_parsecolor() + argument.

    + +diff --git a/userguide/pbmtoppa.html b/userguide/pbmtoppa.html +index f2ccf11..e0abe05 100644 +--- a/userguide/pbmtoppa.html ++++ b/userguide/pbmtoppa.html +@@ -254,7 +254,7 @@ StartEntry: DeskJet720C +   About: { \ +         This driver supports the HP DeskJet 720C \ +         inkjet printer. \ +-        It does does not support color printing. \ ++        It does not support color printing. \ +         IMPORTANT! Insert \ +              "- | pbm2ppa -" \ +         in the "Extra GS Options" field.\ +diff --git a/userguide/pnmgamma.html b/userguide/pnmgamma.html +index 574d7d9..4c884f5 100644 +--- a/userguide/pnmgamma.html ++++ b/userguide/pnmgamma.html +@@ -242,7 +242,7 @@ the output is the same as that of the input. + +

    Because the transformation is not linear, you need a greater maxval + in the output in order not to lose any information from the input. +-For example, if you convert to radiance-linear sample values with with ++For example, if you convert to radiance-linear sample values with + -ungamma -bt709ramp and default gamma value, and your maxval is + 255 on both input and output, 3 different input sample values all + generate output sample value 254. In order to have a different output +diff --git a/userguide/ppmtompeg.html b/userguide/ppmtompeg.html +deleted file mode 100644 +index 4fa4a53..0000000 +--- a/userguide/ppmtompeg.html ++++ /dev/null +@@ -1,1291 +0,0 @@ +- +- +- +-Ppmtompeg User Manual +- +- +-

    Ppmtompeg

    +-Updated: 23 July 2006 +-
    +-Table Of Contents +- +-

    NAME

    +-ppmtompeg - encode an MPEG-1 bitstream +- +-

    SYNOPSIS

    +- +-ppmtompeg +-[options] +-parameter-file +- +-

    DESCRIPTION

    +- +-

    This program is part of Netpbm. +- +-

    ppmtompeg produces an MPEG-1 video stream. MPEG-1 is the +-first great video compression method, and is what is used in Video CDs +-(VCD). ppmtompeg originated in the year 1995. DVD uses a more +-advanced method, MPEG-2. There is an even newer method called MPEG-4 +-which is also called Divx. I don't know where one finds that used. +- +-

    There's technically a difference between a compression method for +-video and an actual file (stream) format for a movie, and I don't know +-if it can be validly said that the format of the stream +-ppmtompeg produces is MPEG-1. +- +-

    Mencoder from the Mplayer +-package is probably superior for most video format generation +-needs, if for no other reason than that it is more popular. +- +-

    The programming library PM2V +-generates MPEG-2 streams. +- +-

    Use Mplayer (not part of Netpbm) +-to do the reverse conversion: to create a series of PNM files from an MPEG +-stream. +- +-

    param_file is a parameter file which includes a list of +-input files and other parameters. The file is described in detail +-below. +- +-

    To understand this program, you need to understand something about +-the complex MPEG-1 format. One source of information about this +-standard format is the section Introduction to MPEG in the Compression FAQ. +- +-

    OPTIONS

    +- +-

    The -gop, -combine_gops, -frames, and +--combine_frames options are all mutually exclusive. +- +-

    +-
    -stat stat_file +- +-
    This option causes ppmtompeg to append the statistics that +-it write to Standard Output to the file stat_file as well. The +-statistics use the following abbreviations: bits per block (bpb), bits +-per frame (bpf), seconds per frame (spf), and bits per second (bps). +- +-

    These statistics include how many I, P, and B frames there were, +-and information about compression and quality. +- +- +-

    -quiet num_seconds +- +-
    causes ppmtompeg not to report remaining time more often +-than every num_seconds seconds (unless the time estimate rises, +-which will happen near the beginning of the run). A negative value +-tells ppmtompeg not to report at all. 0 is the default +-(reports once after each frame). Note that the time remaining is an +-estimate and does not take into account time to read in frames. +- +-
    -realquiet
    causes ppmtompeg to run silently, +-with the only screen output being errors. Particularly useful when +-reading input from stdin. +- +-
    +--no_frame_summary +- +-
    This option prevents ppmtompeg from printing a summary +-line for each frame +- +-
    -float_dct +- +-
    forces ppmtompeg to use a more accurate, yet more +-computationally expensive version of the DCT. +- +-
    -gop gop_num +-
    +-causes ppmtompeg to encode only the numbered GOP (first GOP is 0). The +-parameter file is the same as for normal usage. The output file will be +-the normal output file with the suffix .gop.gop_num. +-ppmtompeg does not output any sequence information. +- +-
    -combine_gops +- +-
    causes ppmtompeg simply to combine some GOP files into a +-single MPEG output stream. ppmtompeg inserts a sequence header +-and trailer. In this case, the parameter file needs only to contain +-the SIZE value, an output file, and perhaps a list of input GOP +-files (see below). +- +-If you don't supply a list of input GOP files is used, then +-ppmtompeg assumes you're using the same parameter file you used +-when you created the input (with the -gop option) and +-calculates the corresponding gop filenames itself. If this is not the +-case, you can specify input GOP files in the same manner as normal +-input files -- except instead of using INPUT_DIR, INPUT, and +-END_INPUT, use GOP_INPUT_DIR, GOP_INPUT, and GOP_END_INPUT. If no +-input GOP files are specified, then the default is to use the output +-file name with suffix .gop.gop_num, with gop_num +-starting from 0, as the input files. +- +-

    Thus, unless you're mixing and matching GOP files from different +-sources, you can simply use the same parameter file for creating the +-GOP files (-gop) and for later turning them into an MPEG stream +-(-combine_gops). +- +- +-

    -frames first_frame last_frame +- +-
    This option causes ppmtompeg to encode only the frames numbered +-first_frame to last_frame, inclusive. The parameter +-file is the same as for normal usage. The output will be placed in +-separate files, one per frame, with the file names being the normal +-output file name with the suffix .frame.frame_num. No +-GOP header information is output. (Thus, the parameter file need not +-include the GOP_SIZE value) +- +-

    Use ppmtompeg -combine_frames to combine these frames later into +-an MPEG stream. +- +- +-

    -combine_frames +- +-
    This option causes ppmtompeg simply to combine some +-individual MPEG frames (such as you might have created with an earlier +-run of ppmtompeg -frames) into a single MPEG stream. Sequence +-and GOP headers are inserted appropriately. In this case, the +-parameter file needs to contain only the SIZE value, the GOP_SIZE +-value, an output file, and perhaps a list of frame files (see below). +- +-

    The parameter file may specify input frame files in the same manner +-as normal input files -- except instead of using INPUT_DIR, INPUT, and +-END_INPUT, use FRAME_INPUT_DIR, FRAME_INPUT, and FRAME_END_INPUT. If +-no input frame files are specified, then the default is to use the +-output file name with suffix .frame.frame_num, with +-frame_num starting from 0, as the input files. +- +- +- +-

    -nice +- +-
    This option causes ppmtompeg to run any remote processes +-"nicely," i.e. at low priority. (This is relevant only if you are +-running ppmtompeg in parallel mode. Otherwise, there are no +-remote processes). See 'man nice.' +- +-
    -max_machines num_machines +- +-
    This option causes ppmtompeg to use no more than +-num_machines machines as slaves for use in parallel encoding. +- +-
    -snr +- +-
    This option causes ppmtompeg to include the signal-to-noise +-ratio in the reported statistics. Prints SNR (Y U V) and peak SNR (Y +-U V) for each frame. In summary, prints averages of luminance only +-(Y). SNR is defined as 10*log(variance of original/variance of +-error). Peak SNR is defined as 20*log(255/RMSE). Note that +-ppmtompeg runs a little slower when you use this option. +- +-
    -mse +- +-
    This option causes ppmtompeg to report the mean squared +-error per block. It also automatically reports the quality of the +-images, so there is no need to specify -snr then. +- +-
    -bit_rate_info rate_file +- +-
    This option makes ppmtompeg write bit rate information +-into the file rate_file. Bit rate information is bits per frame, and +-also bits per I-frame-to-I-frame. +- +-
    -mv_histogram +- +-
    This option causes ppmtompeg to print a histogram of the +-motion vectors as part of statistics. There are three histograms -- +-one for P frame, one for forward B frame, and one for backward B frame +-motion vectors. +- +-

    The output is in the form of a matrix, each entry corresponding to one +-motion vector in the search window. The center of the matrix +-represents (0,0) motion vectors. +- +-

    -debug_sockets +- +-
    This option causes ppmtompeg to print to Standard Output +-messages that narrate the communication between the machines when you run +-ppmtompeg in parallel mode. +- +-
    -debug_machines +- +-
    This option causes ppmtompeg to print to Standard Output +-messages that narrate the progress of the conversion on the various +-machines when you run ppmtompeg in parallel +-mode. +- +-
    +- +-

    PARAMETER FILE

    +- +-

    The parameter file must contain the following +-lines (except when using the -combine_gops or -combine_frames +-options): +- +-

    +- +-
    PATTERN pattern +- +-
    This statement specifies the pattern (sequence) of I frames, P frames, +-and B frames. pattern is just a sequence of the letters I, P, and +-B with nothing between. Example: +- +-
    +-    PATTERN IBBPBBPBBPBBPBB
    +-
    +- +-

    See I Frames, P Frames, B Frames. +- +-

    OUTPUT output file +-
    This names the file where the output MPEG stream goes. +- +-
    INPUT_DIR directory +- +-
    This statement tells where the input images (frames) come from. +-If each frame is in a separate file, directory is the directory +-where they all are. You may use . to refer to the current +-directory. A null directory refers to the root directory of the +-system file tree. +- +-

    To have ppmtompeg read all the frames serially from Standard +-Input, specify +-

    +-    INPUT_DIR stdin
    +-
    +- +-
    INPUT +-
    +-This line must be followed by a list of the input files (in display order) +-and then the line END_INPUT. +- +-

    There are three types of lines between INPUT and END_INPUT. First, +-a line may simply be the name of an input file. Second, the line +-may be of the form single_star_expr +-[x-y]. +-single_star_expr can have a single * in it. It is +-replaced by all the numbers between x and y inclusive. So, for +-example, the line tennis*.ppm [12-15] refers to the files +-tennis12.ppm, tennis13.ppm, tennis14.ppm, tennis15.ppm. +- +-

    Uniform zero-padding occurs, as well. For example, the line +-football.*.ppm [001-130] refers to the files football.001.ppm, +-football.002.ppm, ..., football.009.ppm, football.010.ppm, ..., +-football.130.ppm. +- +-

    The third type of line is: single_star_expr +-[x-y+s], where the +-line is treated exactly as above, except that we skip by s. Thus, the +-line football.*.ppm [001-130+4] refers to the files +-football.001.ppm, football.005.ppm, football.009.ppm, +-football.013.ppm, etc. +- +-

    Furthermore, a line may specify a shell command to execute to +-generate lines to be interpreted as described above, as if those lines +-were in the parameter file instead. Use back ticks, like in the +-Bourne Shell, like this: +- +-

    +-    `cat myfilelist`
    +-
    +- +-

    +-If input is from Standard Input (per the INPUT_DIR statement), +-ppmtompeg ignores the INPUT/END_INPUT block, but +-it still must be present. +- +-

    BASE_FILE_FORMAT {PPM | PNM | YUV | +- JPEG | JMOVIE} +- +-
    ppmtompeg must convert all input files to one of the +-following formats as a first step of processing: PNM, YUV, JPEG(v4), +-or JMOVIE. (The conversion may be trivial if your input files are +-already in one of these formats). This line specifies which of the +-four formats. PPM is actually a subset of PNM. The separate +-specification is allowed for backward compatibility. Use PNM instead +-of PPM in new applications. +- +-
    INPUT_CONVERT conversion_command +- +-
    You must specify how to convert a file to the base file format. +-If no conversion is necessary, then you would just say: +- +-
    +-     INPUT_CONVERT *
    +-     
    +- +-

    Otherwise, conversion_command is a shell command that causes +-an image in the format your specified with BASE_FILE_FORMAT to +-be written to Standard Output. ppmtompeg executes the command +-once for each line between INPUT and END_INPUT (which is +-normally, but not necessarily, a file name). In the conversion +-command, ppmtompeg replaces each '*' with the contents of that +-line. +- +- If you had a bunch of gif files, you might say: +-

    +-     INPUT_CONVERT giftopnm *
    +-     
    +- +- If you have a bunch of separate a.Y, a.U, and a.V files (where +- the U and V have already been subsampled), then you might say: +- +-
    +-     INPUT_CONVERT cat *.Y *.U *.V
    +-     
    +- +-

    Input conversion is not allowed with input from stdin, so use +- +-

    +-     INPUT_CONVERT *
    +-     
    +- +-as described above. +- +-
    SIZE widthxheight +- +-
    +- +-

    width and height are the width and height of each +-frame in pixels. +- +-

    When ppmtompeg can get this information from the input image +-files, it ignores the SIZE parameter and you may omit it. +- +-

    When the image files are in YUV format, the files don't contain +-dimension information, so SIZE is required. +- +-

    When ppmtompeg is running in parallel mode, not all of the +-processes in the network have access to the image files, so +-SIZE is required and must give the same dimensions as the +-input image files. +- +-

    YUV_SIZE widthxheight +- +-
    This is an obsolete synonym of SIZE. +- +-
    YUV_FORMAT {ABEKAS | PHILLIPS | UCB | +- EYUV | pattern} +- +-
    This is meaningful only when BASE_FILE_FORMAT specifies +-YUV format, and then it is required. It specifies the sub-format of +-the YUV class. +- +- +-
    GOP_SIZE n +- +-
    n is the number of frames in a Group of Pictures. Except that +-because a GOP must start with an I frame, ppmtompeg makes a GOP as +-much longer than n as it has to to make the next GOP start with an +-I frame. +- +-

    Normally, it makes sense to make your GOP size a multiple of your +-pattern length (the latter is determined by the PATTERN parameter file +-statement). +- +-

    See Group Of Pictures. +- +-

    SLICES_PER_FRAME n +-
    n is roughly the number of slices per frame. Note, at +-least one MPEG player may complain if slices do not start at the left +-side of an image. To ensure this does not happen, make sure the +-number of rows is divisible by SLICES_PER_FRAME. +- +-
    PIXEL {FULL | HALF} +- +-
    use half-pixel motion vectors, or just full-pixel ones It is +-usually important that you use half-pixel motion vectors, because it +-results in both better quality and better compression. +- +- +-
    RANGE n +-
    Use a search range of n pixels in each of the four directions +-from a subject pixel. (So the search window is a square n*2 pixels +-on a side). +- +-
    PSEARCH_ALG {EXHAUSTIVE | TWOLEVEL | +- SUBSAMPLE | LOGARITHMIC} +- +-
    This statement tells ppmtompeg what kind of search +- technique (algorithm) to use for P frames. You select the desired +- combination of speed and compression. EXHAUSTIVE gives the +- best compression, but LOGARITHMIC is the fastest. +- TWOLEVEL is an exhaustive full-pixel search, followed by a +- local half- pixel search around the best full-pixel vector (the +- PIXEL option is ignored for this search technique). +- +-
    BSEARCH_ALG {SIMPLE | CROSS2 | EXHAUSTIVE} +- +-
    This statement tells ppmtompeg what kind of search +- technique (algorithm) to use for B frames. SIMPLE means +- find best forward and backward vectors, then interpolate. +- CROSS2 means find those two vectors, then see what backward +- vector best matches the best forward vector, and vice versa. +- EXHAUSTIVE does an n-squared search and is +- extremely slow in relation to the others (CROSS2 +- is about half as fast as SIMPLE). +- +-
    IQSCALE n +-
    Use n as the qscale for I frames. +- See Qscale. +- +-
    PQSCALE n +-
    Use n as the qscale for P frames. +- See Qscale. +- +-
    BQSCALE n +-
    Use n as the qscale for B frames. +- See Qscale. +- +-
    REFERENCE_FRAME {ORIGINAL | DECODED}
    This +-statement determines whether ppmtompeg uses the original images +-or the decoded images when computing motion vectors. Using decoded +-images is more accurate and should increase the playback quality of +-the output, but it makes the encoding take longer and seems to give +-worse compression. It also causes some complications with parallel +-encoding. (see the section on parallel encoding). One thing you can +-do as a trade-off is select ORIGINAL here, and lower the +-qscale (see QSCALE if the quality is not good enough. +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
    Original or Decoded? (Normalized)
    ReferenceCompressionSpeedQuality IQuality PQuality B
    Decoded100010001000969919
    Original88513731000912884
    +- +- +- +-
    +- +-

    The following lines are optional: +- +-

    +- +-
    FORCE_ENCODE_LAST_FRAME +- +-
    This statement is obsolete. It does nothing. +- +-

    Before Netpbm 10.26 (January 2005), ppmtompeg would drop +-trailing B frames from your movie, since a movie can't end with a B +-frame. (See I Frames, P Frames, B Frames. +-You would have to specify FORCE_ENCODE_LAST_FRAME to stop +-that from happening and get the same function that ppmtompeg +-has today. +- +- +-

    NIQTABLE +- +-
    This statement specifies a custom non-intra quantization table. +-If you don't specify this statement, ppmtompeg uses a default +-non-intra quantization table. +- +-

    +-The 8 lines immediately following NIQTABLE specify the quantization +-table. Each line defines a table row and consists of 8 integers, +-whitespace-delimited, which define the table columns. +- +-

    IQTABLE +- +-
    This is analogous to NIQTABLE, but for the intra quantization table. +- +-
    ASPECT_RATIO ratio +- +-
    This statement specifies the aspect ratio for ppmtompeg to +-specify in the MPEG output. I'm not sure what this is used for. +- +-

    ratio must be 1.0, 0.6735, 0.7031, 0.7615, 0.8055, 0.8437, +-0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575, or 1.2015. +- +-

    FRAME_RATE rate +-
    This specifies the frame rate for ppmtompeg to specify in the +-MPEG output. Some players use this value to determine the playback rate. +- +-

    rate must be 23.976, 24, 25, 29.97, 30, 50, 59.94, or 60. +- +-

    BIT_RATE rate +-
    This specifies the bit rate for Constant Bit Rate (CBR) encoding. +- +-

    rate must be an integer. +- +-

    BUFFER_SIZE size +- +-
    This specifies the value +-ppmtompeg is to specify in the MPEG output for the Video +-Buffering Verifier (VBV) buffer size needed to decode the sequence. +- +-

    A Video Verifying Buffer is a buffer in which a decoder keeps the +-decoded bits in order to match the uneven speed of the decoding with +-the required constant playback speed. +- +-

    As ppmtompeg encodes the image, it simulates the decoding +-process in terms of how many bits would be in the VBV as each frame gets +-decoded, assuming a VBV of the size you indicate. +- +-

    If you specify the WARN_VBV_UNDERFLOW statement, +-ppmtompeg issues a warning each time the simulation underflows +-the buffer, which suggests that an underflow would occur on playback, +-which suggests the buffer is too small. +- +-

    If you specify the WARN_VBV_OVERFLOW statement, +-ppmtompeg issues a warning each time the simulation overflows +-the buffer, which suggests that an overflow would occur on playback, +-which suggests the buffer is too small. +- +-

    WARN_VBV_UNDERFLOW +-
    WARN_VBV_OVERFLOW +- +-
    See BUFFER_SIZE. +- +-

    These options were new in Netpbm 10.26 (January 2005). Before that, +-ppmtompeg issued the warnings always. +- +-

    +- +- +-The following statements apply only to parallel operation: +- +-
    +- +-
    PARALLEL +- +-
    This statement, paired with END PARALLEL, is what causes +-ppmtompeg to operate in parallel mode. See Parallel Operation. +- +-
    END PARALLEL +- +-
    This goes with PARALLEL. +- +-
    PARALLEL_TEST_FRAMES n +- +-
    The master starts off by measuring each slave's speed. It does +-this by giving each slave n frames to encode and noting how +-long the slave takes to finish. These are not just test frames, +-though -- they're real frames and the results become part of the +-output. +-ppmtompeg is old and measures time in undivided seconds, so +-to get useful timings, specify enough frames that it will take at +-least 5 seconds to process them. The default is 10. +- +-

    If you specify FORCE_I_ALIGN, ppmtompeg will increase +-the test frames value enough to maintain the alignment. +- +-

    If there aren't enough frames for every slave to have the indicated +-number of test frames, ppmtompeg will give some slaves fewer. +- +- +-

    PARALLEL_TIME_CHUNKS t +- +-
    When you specify this statement, the master attempts to feed work +-to the slaves in chunks that take t seconds to process. It uses +-the speed measurement it made when it started up (see PARALLEL_TEST_FRAMES) +-to decide how many frames to put in the chunk. This statement obviously +-doesn't affect the first batch of work sent to each slave, which is the +-one used to measure the slave's speed. +- +-

    Smaller values of t increase communication, but improve load +-balancing. The default is 30 seconds. +- +-

    You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER, +-and PARALLEL_PERFECT. PARALLEL_CHUNK_TAPER is usually best. +- +-

    PARALLEL_CHUNK_TAPER +- +-
    When you specify this statement, the master distributes work like +-with PARALLEL_TIME_CHUNKS, except that the master chooses the number +-of seconds for the chunks. It starts with a large number and, as it +-gets closer to finishing the job, reduces it. That way, it reduces +-scheduling overhead when precise scheduling isn't helpful, but still +-prevents a slave from finishing early after all the work has already +-been handed out to the other slaves, and then sitting idle while +-there's still work to do. +- +-

    You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER, +-and PARALLEL_PERFECT. PARALLEL_CHUNK_TAPER is usually best. +- +- +-

    PARALLEL_PERFECT +- +-
    If this statement is present, ppmtompeg schedules on the +-assumption that each machine is about the same speed. The master will +-simply divide up the frames evenly between the slaves -- each +-slave gets the same number of frames. If some slaves are faster than +-others, they will finish first and remain idle while the slower slaves +-continue. +- +-

    This has the advantage of minimal scheduling overhead. Where slaves +-have different speeds, though, it makes inefficient use of the fast +-ones. Where slaves are the same speed, it also has the disadvantage +-that they all finish at the same time and feed their output to the +-single Combine Server in a burst, which makes less efficient use of +-the Combine Server and thus can increase the total elapsed time. +- +-

    You may specify only one of PARALLEL_TIME_CHUNKS, PARALLEL_CHUNK_TAPER, +-and PARALLEL_PERFECT. PARALLEL_CHUNK_TAPER is usually best. +- +-

    RSH remote_shell_command +- +-
    ppmtompeg executes the shell command +-remote_shell_command to start a process on another machine. +-The default command is rsh, and whatever command you specify +-must have compatible semantics. ssh is usually compatible. +-The command ppmtompeg uses is one like this: +-ssh remote.host.com -l username shellcommand. +- +-

    Be sure to set up .rhosts files or SSH key authorizations +-where needed. Otherwise, you'll have to type in passwords. +- +-

    On some HP machines, rsh is the restricted shell, and you want +-to specify remsh. +- +-

    FORCE_I_ALIGN +- +-
    This statement forces each slave to encode a chunk of frames which +-is a multiple of the pattern length (see PATTERN). Since the +-first frame in any pattern is an I frame, this forces each chunk +-encoded by a slave to begin with an I frame. +- +-

    This document used to say there was an argument to +-FORCE_I_ALIGN which was the number of frames ppmtompeg +-would use (and was required to be a multiple of the pattern length). +-But ppmtompeg has apparently always ignored that argument, and +-it does now. +- +-

    KEEP_TEMP_FILES +- +-
    This statement causes ppmtompeg not to delete the temporary +-files it uses to transmit encoded frames to the combine server. This +-means you will be left with a file for each frame, the same as you +-would get with the -frames option. +- +-

    This is mostly useful for debugging. +- +-

    This works only if you're using a shared filesystem to communicate +-between the servers. +- +-

    This option was new in Netpbm 10.26 (January 2005). +- +-

    +- +- +-

    Parameter File Notes

    +- +-

    If you use the -combine_gops option, then you need to specify +-only the SIZE and OUTPUT values in the parameter file. In +-addition, the parameter file may specify input GOP files in the same +-manner as normal input files -- except instead of using INPUT_DIR, +-INPUT, and END_INPUT, use GOP_INPUT_DIR, GOP_INPUT, and GOP_END_INPUT. +-If you specify no input GOP files, then ppmtompeg uses by default the +-output file name with suffix .gop.gop_num, with gop_num +-starting from 0, as the input files. +- +-

    If you use the -combine_frames option, then you need to +-specify only the SIZE, GOP_SIZE, and OUTPUT values in the +-parameter file. In addition, the parameter file may specify input +-frame files in the same manner as normal input files -- except instead +-of using INPUT_DIR, INPUT, and END_INPUT, use FRAME_INPUT_DIR, +-FRAME_INPUT, and FRAME_END_INPUT. If no input frame files are +-specified, then the default is to use the output file name with suffix +-.frame.frame_num, with frame_num starting from 0, +-as the input files. +- +-

    Any number of spaces and tabs may come between each option and value. Lines +-beginning with # are ignored. Any other lines are ignored except for +-those between INPUT and END_INPUT. This allows you to use the same +-parameter file for normal usage and for -combine_gops and +--combine_frames. +- +-

    The file format is case-sensitive so all keywords should be in +-upper case. +- +-

    The statements may appear in any order, except that the order within +-a block statement (such as INPUT ... END INPUT) is significant. +- +-

    ppmtompeg is prepared to handle up to 16 B frames between +-reference frames when encoding with input from stdin. (To build a +-modified ppmtompeg with a higher limit, change the constant +-B_FRAME_RUN in frame.c and recompile). +- +-

    GENERAL USAGE INFORMATION

    +- +-

    Qscale

    +- +-

    The quantization scale values (qscale) give a trade-off between +-quality and compression. Using different Qscale values has very little +-effect on speed. The qscale values can be set separately for I, P, and +-B frames. +- +-

    You select the qscale values with the IQSCALE, +-PQSCALE, and BSCALE parameter file statements. +- +-

    A qscale value is an integer from 1 to 31. Larger numbers give +-better compression, but worse quality. In the following, the quality +-numbers are peak signal-to-noise ratio, defined as: +-signal-to-noise formula +-where MSE is the mean squared error. +- +- +-

    Flower garden tests: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
    Qscale vs Quality
    QscaleI FramesP FramesB Frames
    143.246.346.5
    632.634.634.3
    1128.629.530.0
    1626.326.828.6
    2124.725.027.9
    2623.523.927.5
    3122.623.027.3
    +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
    Qscale vs Compression
    QscaleI FramesP FramesB Frames
    1222
    671015
    11111843
    16152997
    211941173
    262456256
    312873330
    +- +- +-

    Search Techniques

    +- +-

    There are several different motion vector search techniques +-available. There are different techniques available for P frame +-search and B frame search. Using different search techniques present +-little difference in quality, but a large difference in compression +-and speed. +- +-

    There are 4 types of P frame search: Exhaustive, TwoLevel, +-SubSample, and Logarithmic. +- +-

    There are 3 types of B frame search: Exhaustive, Cross2, and +-Simple. +- +-The recommended search techniques are TwoLevel and Logarithmic for +-P frame search, and Cross2 and Simple for B frame search. Here are +-some numbers comparing the different search methods: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
    P frame Motion Vector Search (Normalized)
    TechniqueCompression1Speed 2Quality 3
    Exhaustive100010001000
    SubSample100824561000
    TwoLevel100932371000
    Logarithmic10858229998
    +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
    B frame Motion Vector Search (Normalized)
    TechniqueCompression1Speed2Quality3
    Exhaustive100010001000
    Cross29751000996
    Simple9381765991
    +- +- 1Smaller numbers are better +-compression. +- +- 2Larger numbers mean faster +-execution. +- +- 3Larger numbers mean better quality. +- +-

    For some reason, Simple seems to give better compression, but it +-depends on the image sequence. +- +-

    Select the search techniques with the PSEARCH_ALG and +-BSEARCH_ALG parameter file statements. +- +- +- +-

    Group Of Pictures (GOP)

    +- +-

    A Group of Pictures (GOP) is a roughly independently decodable +-sequence of frames. An MPEG video stream is made of one or more +-GOP's. You may specify how many frames should be in each GOP with the +-GOP_SIZE parameter file statement. A GOP always starts with an +-I frame. +- +-

    Instead of encoding an entire sequence, you can encode a single +-GOP. To do this, use the -gop command option. You can later +-join the resulting GOP files at any time by running ppmtompeg +-with the -combine_gops command option. +- +- +-

    Slices

    +- +-

    A slice is an independently decodable unit in a frame. It can be +-as small as one macroblock, or it can be as big as the entire frame. +-Barring transmission error, adding slices does not change quality or +-speed; the only effect is slightly worse compression. More slices are +-used for noisy transmission so that errors are more recoverable. Since +-usually errors are not such a problem, we usually just use one slice +-per frame. +- +-

    Control the slice size with the SLICES_PER_FRAME parameter +-file statement. +- +-

    Some MPEG playback systems require that each slice consist of whole +-rows of macroblocks. If you are encoding for this kind of player, if +-the height of the image is H pixels, then you should set the +-SLICES_PER_FRAME to some number which divides H/16. For example, if +-the image is 240 pixels (15 macroblocks) high, then you should use +-only 15, 5, 3, or 1 slices per frame. +- +-

    Note: these MPEG playback systems are really wrong, since the MPEG +-standard says this doesn't have to be so. +- +- +- +-

    Search Window

    +- +-

    The search window is the window in which ppmtompeg searches +-for motion vectors. The window is a square. You can specify the size +-of the square, and whether to allow half-pixel motion vectors or not, +-with the RANGE and PIXEL parameter file statements. +- +-

    I Frames, P Frames, B Frames

    +- +-

    In MPEG-1, a movie is represented as a sequence of MPEG frames, +-each of which is an I Frame, a P Frame, or a B Frame. Each represents +-an actual frame of the movie (don't get confused by the dual use of +-the word "frame." A movie frame is a graphical image. An MPEG frame +-is a set of data that describes a movie frame). +- +-

    An I frame ("intra" frame) describes a movie frame in isolation -- +-without respect to any other frame in the movie. A P frame +-("predictive" frame) describes a movie frame by describing how it +-differs from the movie frame described by the latest preceding I or +-P frame. A B frame ("bidirectional" frame) describes a movie frame by +-describing how it differs from the the movie frames described by the +-nearest I or P frame before and after it. +- +-

    Note that the first frame of a movie must be described by an I +-frame (because there is no previous movie frame) and the last movie +-frame must be described by an I or P frame (because there is no +-subsequent movie frame). +- +-

    Beyond that, you can choose which frames are represented by which +-types. You specify a pattern, such as IBPBP and ppmtompeg +-simply repeats it over and over throughout the movie. The pattern +-affects speed, quality, and stream size. Here is a chart which shows +-some of the trade-offs: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
    Comparison of I/P/B Frames (Normalized)
    Frame TypeSizeSpeedQuality
    I frames100010001000
    P frames409609969
    B frames72260919
    +- +-(this is with constant qscale) +- +-

    A standard sequence is IBBPBBPBBPBBPBB. +- +-

    Select the sequence with the PATTERN parameter file statement. +- +-

    Since the last MPEG frame cannot be a B frame (see above), if the +-pattern you specify indicates a B frame for the last movie frame of +-the movie, ppmtompeg makes it an I frame instead. +- +-

    Before Netpbm 10.26 (January 2005), ppmtompeg instead drops +-the trailing B frames by default, and you need the +-FORCE_ENCODE_LAST_FRAME parameter file statement to make it do +-this. +- +-

    The MPEG frames don't appear in the MPEG-1 stream in the same order that +-the corresponding movie frames appear in the movie -- the B frames come after +-the I and P frames on which they are based. For example, if the movie is +-4 frames that you will represent with the pattern IBBP, the MPEG-1 stream +-will start with an I frame describing movie frame 0. The next frame in +-the MPEG-1 stream is a P frame describing movie frame 3. The last two +-frames in the MPEG-1 stream are B frames describing movie frames 1 and 2, +-respectively. +- +- +-

    Specifying Input and Output Files

    +- +-

    Specify the input frame images with the INPUT_DIR, +-INPUT, END_INPUT, BASE_FILE_FORMAT, +-SIZE, YUV_FORMAT and INPUT_CONVERT parameter +-file statements. +- +-

    Specify the output file with the OUTPUT parameter file statement. +- +- +-

    Statistics

    +- +-

    ppmtompeg can generate a variety of statistics about the +-encoding. See the -stat, -snr, -mv_histogram, +--quiet, -no_frame_summary, and -bit_rate_info +-options. +- +- +-

    PARALLEL OPERATION

    +- +-

    You can run ppmtompeg on multiple machines at once, encoding +-the same MPEG stream. When you do, the machines are used as shown in +-the following diagram. We call this "parallel mode." +- +-

    ppmtompeg-par.gif +- +-

    To do parallel processing, put the statement +- +-

    +-    PARALLEL
    +-
    +- +-in the parameter file, followed by a listing of the machines, one +-machine per line, then +- +-
    +-    END_PARALLEL
    +-
    +- +-Each of the machine lines must be in one of two forms. If the machine +-has filesystem access to the input files, then the line is: +- +-

    +-machine user executable +- +-

    The executable is normally ppmtompeg (you may need to give +-the complete path if you've built for different architectures). If +-the machine does not have filesystem access to the input files, the line +-is: +- +-

    REMOTE machine user executable +-parameter file +- +-

    The -max_machines command option limits the number of +-machines ppmtompeg will use. If you specify more machines in +-the parameter file than -max_machines allows, ppmtompeg +-uses only the machines listed first. This is handy if you want to +-experiment with different amounts of parallelism. +- +-

    In general, you should use full path file names when describing +-executables and parameter files. This includes the parameter +-file argument on the original invocation of ppmtompeg. +- +-

    All file names must be the same on all systems (so if e.g. you're +-using an NFS filesystem, you must make sure it is mounted at the same +-mountpoint on all systems). +- +-

    Because not all of the processes involved in parallel operation +-have easy access to the input files, you must specify the SIZE +-parameter file statement when you do parallel operation. +- +-

    The machine on which you originally invoke ppmtompeg is the +-master machine. It hosts a "combine server,", a +-"decode server," and a number of "i/o servers," +-all as separate processes. The other machines in the network (listed +-in the parameter file) are slave machines. Each hosts a single +-process that continuously requests work from the master and does it. +-The slave process does the computation to encode MPEG frames. It +-processes frames in batches identified by the master. +- +-

    The master uses a remote shell command to start a process on a +-slave machine. By default, it uses an rsh shell command to do +-this. But use the RSH parameter file statement to control +-this. The shell command the master executes remotely is +-ppmtompeg, but with options to indicate that it is to perform +-slave functions. +- +-

    The various machines talk to each other over TCP connections. Each +-machine finds and binds to a free TCP port number and tells its +-partners the port number. These port numbers are at least 2048. +- +-

    Use the PARALLEL_TEST_FRAMES, PARALLEL_TIME_CHUNKS, and +-PARALLEL_PERFECT parameter file statements to control the way the +-master divides up work among the slaves. +- +-

    Use the -nice command option to cause all slave processes to run +-"nicely," i.e. as low priority processes. That way, this substantial and +-long-running CPU load will have minimal impact on other, possibly +-interactive, users of the systems. +- +-  +-

    SPEED

    +- +-

    Here is a look at ppmtompeg speed, in single-node (not parallel) +-operation: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
    Compression Speed
    Machine TypeMacroblocks per second1
    HP 9000/755280
    DEC 3000/400247
    HP 9000/750191
    Sparc 10104
    DEC 500068
    +-1A macroblock is a 16x16 pixel square +- +-

    The measurements in the table are with inputs and outputs via a +-conventional locally attached filesystem. If you are using a network +-filesystem over a single 10 MB/s Ethernet, that constrains your speed more +-than your CPU speed. In that case, don't expect to get better than 4 +-or 5 frames per second no matter how fast your CPUs are. +- +-

    Network speed is even more of a bottleneck when the slaves do not +-have filesystem access to the input files -- i.e. you declare them +-REMOTE. +- +-

    Where I/O is the bottleneck, size of the input frames can make a big +-difference. So YUV input is better than PPM, and JPEG is better than +-both. +- +-

    When you're first trying to get parallel mode working, be sure to +-use the -debug_machines option so you can see what's going on. +-Also, -debug_sockets can help you diagnose communication +-problems. +- +- +-

    AUTHORS

    +- +- +- +-
    +-  +-

    Table Of Contents

    +- +- +- diff --git a/SOURCES/netpbm-message.patch b/SOURCES/netpbm-message.patch new file mode 100644 index 0000000..0a820fc --- /dev/null +++ b/SOURCES/netpbm-message.patch @@ -0,0 +1,12 @@ +diff -up netpbm-10.59.01/converter/other/giftopnm.c.message netpbm-10.59.01/converter/other/giftopnm.c +--- netpbm-10.59.01/converter/other/giftopnm.c.message 2012-07-11 05:54:52.000000000 +0200 ++++ netpbm-10.59.01/converter/other/giftopnm.c 2012-07-11 05:57:57.745246980 +0200 +@@ -2038,7 +2038,7 @@ convertImages(FILE * const ifP, + imageSeq, imageSeq > 1 ? "s" : ""); + } else { + if (verbose) +- pm_message("Reading Image Sequence %u", imageSeq); ++ pm_message("Reading Image Sequence %u", imageSeq+1); + + convertImage(ifP, !allImages && (imageSeq != requestedImageSeq), + imageOutFileP, alphaFileP, gifScreen, gif89, diff --git a/SOURCES/netpbm-multilib.patch b/SOURCES/netpbm-multilib.patch new file mode 100644 index 0000000..ea689bc --- /dev/null +++ b/SOURCES/netpbm-multilib.patch @@ -0,0 +1,11 @@ +diff -up netpbm-10.47.04/buildtools/endiangen.c.multilib netpbm-10.47.04/buildtools/endiangen.c +--- netpbm-10.47.04/buildtools/endiangen.c.multilib 2009-10-21 13:38:54.000000000 +0200 ++++ netpbm-10.47.04/buildtools/endiangen.c 2009-10-21 14:35:58.000000000 +0200 +@@ -87,7 +87,6 @@ main(int argc, char **argv) { + byteOrder() == ENDIAN_LITTLE ? "LITTLE_ENDIAN" : "BIG_ENDIAN"); + printf("#endif\n"); + printf("\n"); +- printf("#define BITS_PER_LONG %u\n", bitsPerLong()); + + return 0; + } diff --git a/SOURCES/netpbm-multipage-pam.patch b/SOURCES/netpbm-multipage-pam.patch new file mode 100644 index 0000000..59b1651 --- /dev/null +++ b/SOURCES/netpbm-multipage-pam.patch @@ -0,0 +1,25 @@ +diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c +index 24dc7df..e393931 100644 +--- a/converter/other/pnmtops.c ++++ b/converter/other/pnmtops.c +@@ -1909,6 +1909,7 @@ convertPage(FILE * const ifP, + /* The file stream which is the head of the filter chain; we write to + this and filtered stuff comes out the other end. + */ ++ FILE * filterChainOfP; + + pnm_readpaminit(ifP, &inpam, PAM_STRUCT_SIZE(tuple_type)); + +@@ -1951,7 +1952,11 @@ convertPage(FILE * const ifP, + initOutputEncoder(&oe, inpam.width, bitsPerSample, + rle, flate, ascii85, psFilter); + +- spawnFilters(stdout, &oe, &feedFileP, filterPidList); ++ fflush(stdout); ++ filterChainOfP = fdopen(dup(fileno(stdout)), "w"); ++ /* spawnFilters() closes this. See FILE MANAGEMENT above */ ++ ++ spawnFilters(filterChainOfP, &oe, &feedFileP, filterPidList); + + convertRaster(&inpam, bitsPerSample, psFilter, feedFileP); + diff --git a/SOURCES/netpbm-nodoc.patch b/SOURCES/netpbm-nodoc.patch new file mode 100644 index 0000000..2ecf665 --- /dev/null +++ b/SOURCES/netpbm-nodoc.patch @@ -0,0 +1,20 @@ +--- netpbm-10.24/GNUmakefile.nodoc 2004-08-11 20:41:54.000000000 +0200 ++++ netpbm-10.24/GNUmakefile 2004-09-23 16:08:29.724369240 +0200 +@@ -275,16 +275,12 @@ + endif + + .PHONY: install.manweb +-install.manweb: $(PKGDIR)/man/web/netpbm.url $(PKGDIR)/bin/doc.url ++install.manweb: $(PKGDIR)/man/web/netpbm.url + + $(PKGDIR)/man/web/netpbm.url: $(PKGDIR)/man/web + echo "$(NETPBM_DOCURL)" > $@ + chmod $(INSTALL_PERM_MAN) $@ + +-$(PKGDIR)/bin/doc.url: $(PKGDIR)/bin +- echo "$(NETPBM_DOCURL)" > $@ +- chmod $(INSTALL_PERM_MAN) $@ +- + .PHONY: install-dev + # Note that you might install the development package and NOT the runtime + # package. If you have a special system for building stuff, maybe for diff --git a/SOURCES/netpbm-noppmtompeg.patch b/SOURCES/netpbm-noppmtompeg.patch new file mode 100644 index 0000000..58b7fa8 --- /dev/null +++ b/SOURCES/netpbm-noppmtompeg.patch @@ -0,0 +1,23 @@ +diff -up netpbm-10.47.12/buildtools/manpage.mk.noppmtompeg netpbm-10.47.12/buildtools/manpage.mk +--- netpbm-10.47.12/buildtools/manpage.mk.noppmtompeg 2010-04-27 09:54:52.121522491 -0400 ++++ netpbm-10.47.12/buildtools/manpage.mk 2010-04-27 09:55:10.337642487 -0400 +@@ -251,7 +251,6 @@ MAN1 = \ + ppmtolj.1 \ + ppmtomap.1 \ + ppmtomitsu.1 \ +- ppmtompeg.1 \ + ppmtoneo.1 \ + ppmtopcx.1 \ + ppmtopgm.1 \ +diff -up netpbm-10.47.12/converter/ppm/Makefile.noppmtompeg netpbm-10.47.12/converter/ppm/Makefile +--- netpbm-10.47.12/converter/ppm/Makefile.noppmtompeg 2010-04-27 09:55:20.293517254 -0400 ++++ netpbm-10.47.12/converter/ppm/Makefile 2010-04-27 09:55:41.534642567 -0400 +@@ -7,7 +7,7 @@ VPATH=.:$(SRCDIR)/$(SUBDIR) + + include $(BUILDDIR)/config.mk + +-SUBDIRS = hpcdtoppm ppmtompeg ++SUBDIRS = hpcdtoppm + + PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \ + leaftoppm mtvtoppm neotoppm \ diff --git a/SOURCES/netpbm-pamtojpeg2k.patch b/SOURCES/netpbm-pamtojpeg2k.patch new file mode 100644 index 0000000..9615ce7 --- /dev/null +++ b/SOURCES/netpbm-pamtojpeg2k.patch @@ -0,0 +1,11 @@ +diff -up netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c.pamtojpeg2kfix netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c +--- netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c.pamtojpeg2kfix 2010-04-27 15:47:10.000000000 +0200 ++++ netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c 2010-05-03 15:37:49.934269588 +0200 +@@ -518,7 +518,5 @@ main(int argc, char **argv) + + pm_close(ifP); + +- pm_close(stdout); +- + return 0; + } diff --git a/SOURCES/netpbm-pnmtopclxl.patch b/SOURCES/netpbm-pnmtopclxl.patch new file mode 100644 index 0000000..dc67040 --- /dev/null +++ b/SOURCES/netpbm-pnmtopclxl.patch @@ -0,0 +1,16 @@ +diff -up netpbm-10.58.01/converter/other/pnmtopclxl.c.pnmtopclxl netpbm-10.58.01/converter/other/pnmtopclxl.c +--- netpbm-10.58.01/converter/other/pnmtopclxl.c.pnmtopclxl 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/pnmtopclxl.c 2012-06-13 15:39:17.566141565 +0200 +@@ -269,10 +269,10 @@ XY_RLEnew(size_t const size) { + + MALLOCVAR(rleP); + if (rleP) { +- rleP->fbuf = malloc(size); ++ rleP->fbufsize = MAX(1024, size); ++ rleP->fbuf = malloc(rleP->fbufsize); + + if (rleP->fbuf) { +- rleP->fbufsize = MAX(1024, size); + retval = rleP; + } else + retval = NULL; diff --git a/SOURCES/netpbm-ppmfadeusage.patch b/SOURCES/netpbm-ppmfadeusage.patch new file mode 100644 index 0000000..88ad44c --- /dev/null +++ b/SOURCES/netpbm-ppmfadeusage.patch @@ -0,0 +1,67 @@ +diff -up netpbm-10.47.09/editor/ppmfade.ppmfadeusage netpbm-10.47.09/editor/ppmfade +--- netpbm-10.47.09/editor/ppmfade.ppmfadeusage 2010-02-17 11:22:02.000000000 +0100 ++++ netpbm-10.47.09/editor/ppmfade 2010-02-17 11:27:29.000000000 +0100 +@@ -34,7 +34,6 @@ my $base_name = "fade"; # default base + my $image = "ppm"; # default output storage format + my $mode = $SPREAD; # default fading mode + +- + my $n; # argument number + + for ($n = 0; $n < @ARGV; $n++) { +@@ -44,7 +43,7 @@ for ($n = 0; $n < @ARGV; $n++) { + if (-e $first_file) { + } else { + print "I can't find first file '$first_file'\n"; +- exit 20; ++ exit 1; + } + } elsif ($ARGV[$n] eq "-l") { + $n++; +@@ -52,7 +51,7 @@ for ($n = 0; $n < @ARGV; $n++) { + if (-e $last_file) { + } else { + print "I can't find last file '$last_file'\n"; +- exit 20; ++ exit 1; + } + } elsif ($ARGV[$n] eq "-base") { + $n++; +@@ -73,11 +72,12 @@ for ($n = 0; $n < @ARGV; $n++) { + $mode = $BLOCK; + } elsif ("$ARGV[$n]" eq "-mix") { + $mode = $MIX; +- } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "-h") { +- usage(); ++ } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "--help" || $ARGV[$n] eq "-h") { ++ print "ppmfade: Use 'man ppmfade' for help.\n"; ++ exit 1; + } else { + print "Unknown argument: $ARGV[$n]\n"; +- exit 100; ++ exit 1; + } + } + # +@@ -96,18 +96,18 @@ if ($first_file ne "undefined") { + $width = $1; $height = $2; + } else { + print("Unrecognized results from pnmfile on $first_file.\n"); +- exit(50); ++ exit 1; + } + } elsif ($last_file ne "undefined") { + if ((`pnmfile $last_file` =~ m{\b(\d+)\sby\s(\d+)} )) { + $width = $1; $height = $2; + } else { + print("Unrecognized results from pnmfile on $first_file.\n"); +- exit(50); ++ exit 1; + } + } else { + print("ppmfade: You must specify -f or -l (or both)\n"); +- exit(90); ++ exit 1; + } + + print("Frames are " . $width . "W x " . $height . "H\n"); diff --git a/SOURCES/netpbm-ppmtopict.patch b/SOURCES/netpbm-ppmtopict.patch new file mode 100644 index 0000000..97b7d2b --- /dev/null +++ b/SOURCES/netpbm-ppmtopict.patch @@ -0,0 +1,12 @@ +diff -up netpbm-10.58.01/converter/ppm/ppmtopict.c.ppmtopict netpbm-10.58.01/converter/ppm/ppmtopict.c +--- netpbm-10.58.01/converter/ppm/ppmtopict.c.ppmtopict 2012-06-13 09:52:42.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/ppmtopict.c 2012-06-13 11:33:11.134747363 +0200 +@@ -200,7 +200,7 @@ putRow(FILE * const ifP, + pixel * const rowpixels, + char * const packed) { + +- unsigned int i; ++ int i; + unsigned int count; + unsigned int run; + unsigned int rep; diff --git a/SOURCES/netpbm-security-code.patch b/SOURCES/netpbm-security-code.patch new file mode 100644 index 0000000..27b49fb --- /dev/null +++ b/SOURCES/netpbm-security-code.patch @@ -0,0 +1,1682 @@ +diff -up netpbm-10.58.01/analyzer/pgmtexture.c.security-code netpbm-10.58.01/analyzer/pgmtexture.c +--- netpbm-10.58.01/analyzer/pgmtexture.c.security-code 2012-04-09 15:31:32.000000000 +0200 ++++ netpbm-10.58.01/analyzer/pgmtexture.c 2012-04-09 15:40:03.183620040 +0200 +@@ -97,7 +97,7 @@ vector(unsigned int const nl, + float * v; + + assert(nh >= nl); +- ++ overflow_add(nh - nl, 1); + MALLOCARRAY(v, (unsigned) (nh - nl + 1)); + + if (v == NULL) +@@ -129,6 +129,7 @@ matrix (unsigned int const nrl, + assert(nrh >= nrl); + + /* allocate pointers to rows */ ++ overflow_add(nrh - nrl, 1); + MALLOCARRAY(m, (unsigned) (nrh - nrl + 1)); + if (m == NULL) + pm_error("Unable to allocate memory for a matrix."); +@@ -136,7 +137,7 @@ matrix (unsigned int const nrl, + m -= ncl; + + assert (nch >= ncl); +- ++ overflow_add(nch - ncl, 1); + /* allocate rows and set pointers to them */ + for (i = nrl; i <= nrh; ++i) { + MALLOCARRAY(m[i], (unsigned) (nch - ncl + 1)); +diff -up netpbm-10.58.01/converter/other/gemtopnm.c.security-code netpbm-10.58.01/converter/other/gemtopnm.c +--- netpbm-10.58.01/converter/other/gemtopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/gemtopnm.c 2012-04-09 15:40:03.183620040 +0200 +@@ -106,6 +106,7 @@ main(argc, argv) + + pnm_writepnminit( stdout, cols, rows, MAXVAL, type, 0 ); + ++ overflow_add(cols, padright); + { + /* allocate input row data structure */ + int plane; +diff -up netpbm-10.58.01/converter/other/jpegtopnm.c.security-code netpbm-10.58.01/converter/other/jpegtopnm.c +--- netpbm-10.58.01/converter/other/jpegtopnm.c.security-code 2012-04-09 15:31:40.000000000 +0200 ++++ netpbm-10.58.01/converter/other/jpegtopnm.c 2012-04-09 15:40:03.184620028 +0200 +@@ -861,6 +861,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); + +diff -up netpbm-10.58.01/converter/other/pbmtopgm.c.security-code netpbm-10.58.01/converter/other/pbmtopgm.c +--- netpbm-10.58.01/converter/other/pbmtopgm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/pbmtopgm.c 2012-04-09 15:40:03.184620028 +0200 +@@ -47,6 +47,7 @@ main(int argc, char *argv[]) { + "than the image height (%u rows)", height, rows); + + outrow = pgm_allocrow(cols) ; ++ overflow2(width, height); + maxval = MIN(PGM_OVERALLMAXVAL, width*height); + pgm_writepgminit(stdout, cols, rows, maxval, 0) ; + +diff -up netpbm-10.58.01/converter/other/pnmtoddif.c.security-code netpbm-10.58.01/converter/other/pnmtoddif.c +--- netpbm-10.58.01/converter/other/pnmtoddif.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/pnmtoddif.c 2012-04-09 15:40:03.185620015 +0200 +@@ -632,6 +632,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; +@@ -647,6 +648,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; +diff -up netpbm-10.58.01/converter/other/pnmtojpeg.c.security-code netpbm-10.58.01/converter/other/pnmtojpeg.c +--- netpbm-10.58.01/converter/other/pnmtojpeg.c.security-code 2012-04-09 15:31:39.000000000 +0200 ++++ netpbm-10.58.01/converter/other/pnmtojpeg.c 2012-04-09 15:40:03.186620002 +0200 +@@ -605,7 +605,11 @@ read_scan_script(j_compress_ptr const ci + want JPOOL_PERMANENT. + */ + const unsigned int scan_info_size = nscans * sizeof(jpeg_scan_info); +- jpeg_scan_info * const scan_info = ++ const jpeg_scan_info * scan_info; ++ ++ overflow2(nscans, sizeof(jpeg_scan_info)); ++ ++ scan_info = + (jpeg_scan_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + scan_info_size); +@@ -937,6 +941,8 @@ compute_rescaling_array(JSAMPLE ** const + const long half_maxval = maxval / 2; + long val; + ++ overflow_add(maxval, 1); ++ overflow2(maxval+1, sizeof(JSAMPLE)); + *rescale_p = (JSAMPLE *) + (cinfo.mem->alloc_small) ((j_common_ptr) &cinfo, JPOOL_IMAGE, + (size_t) (((long) maxval + 1L) * +@@ -1015,6 +1021,7 @@ convert_scanlines(struct jpeg_compress_s + */ + + /* Allocate the libpnm output and compressor input buffers */ ++ overflow2(cinfo_p->image_width, cinfo_p->input_components); + buffer = (*cinfo_p->mem->alloc_sarray) + ((j_common_ptr) cinfo_p, JPOOL_IMAGE, + (unsigned int) cinfo_p->image_width * cinfo_p->input_components, +diff -up netpbm-10.58.01/converter/other/pnmtops.c.security-code netpbm-10.58.01/converter/other/pnmtops.c +--- netpbm-10.58.01/converter/other/pnmtops.c.security-code 2012-04-09 15:31:40.000000000 +0200 ++++ netpbm-10.58.01/converter/other/pnmtops.c 2012-04-09 15:40:03.187619989 +0200 +@@ -256,17 +256,21 @@ parseCommandLine(int argc, const char ** + validateCompDimension(width, 72, "-width value"); + validateCompDimension(height, 72, "-height value"); + ++ overflow2(width, 72); + cmdlineP->width = width * 72; ++ overflow2(height, 72); + cmdlineP->height = height * 72; + + if (imagewidthSpec) { + validateCompDimension(imagewidth, 72, "-imagewidth value"); ++ overflow2(imagewidth, 72); + cmdlineP->imagewidth = imagewidth * 72; + } + else + cmdlineP->imagewidth = 0; + if (imageheightSpec) { +- validateCompDimension(imagewidth, 72, "-imageheight value"); ++ validateCompDimension(imageheight, 72, "-imageheight value"); ++ overflow2(imageheight, 72); + cmdlineP->imageheight = imageheight * 72; + } + else +diff -up netpbm-10.58.01/converter/other/pnmtorle.c.security-code netpbm-10.58.01/converter/other/pnmtorle.c +--- netpbm-10.58.01/converter/other/pnmtorle.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/pnmtorle.c 2012-04-09 15:40:03.188619976 +0200 +@@ -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 +diff -up netpbm-10.58.01/converter/other/pnmtosgi.c.security-code netpbm-10.58.01/converter/other/pnmtosgi.c +--- netpbm-10.58.01/converter/other/pnmtosgi.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/pnmtosgi.c 2012-04-09 15:40:03.188619976 +0200 +@@ -254,6 +254,7 @@ build_channels(FILE * const ifp, int con + #endif + + if( storage != STORAGE_VERBATIM ) { ++ overflow2(channels, rows); + MALLOCARRAY_NOFAIL(table, channels * rows); + MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols)); + } +@@ -306,6 +307,8 @@ compress(ScanElem * temp, + break; + case STORAGE_RLE: + tabrow = chan_no * rows + row; ++ overflow2(chan_no, rows); ++ overflow_add(chan_no* rows, row); + len = rle_compress(temp, cols); /* writes result into rletemp */ + channel[chan_no][row].length = len; + MALLOCARRAY(p, len); +diff -up netpbm-10.58.01/converter/other/rletopnm.c.security-code netpbm-10.58.01/converter/other/rletopnm.c +--- netpbm-10.58.01/converter/other/rletopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/rletopnm.c 2012-04-09 15:40:03.189619963 +0200 +@@ -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 +diff -up netpbm-10.58.01/converter/other/sgitopnm.c.security-code netpbm-10.58.01/converter/other/sgitopnm.c +--- netpbm-10.58.01/converter/other/sgitopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/sgitopnm.c 2012-04-09 15:40:03.189619963 +0200 +@@ -359,10 +359,14 @@ readChannels(FILE * const ifP, + MALLOCARRAY_NOFAIL(image, head->ysize); + } else { + maxchannel = MIN(3, head->zsize); ++ 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; +diff -up netpbm-10.58.01/converter/other/sirtopnm.c.security-code netpbm-10.58.01/converter/other/sirtopnm.c +--- netpbm-10.58.01/converter/other/sirtopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/sirtopnm.c 2012-04-09 15:40:03.190619951 +0200 +@@ -69,6 +69,7 @@ char* argv[]; + } + break; + case PPM_TYPE: ++ overflow3(cols, rows, 3); + picsize = cols * rows * 3; + planesize = cols * rows; + if ( !( sirarray = (unsigned char*) malloc( picsize ) ) ) +diff -up netpbm-10.58.01/converter/other/tifftopnm.c.security-code netpbm-10.58.01/converter/other/tifftopnm.c +--- netpbm-10.58.01/converter/other/tifftopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/other/tifftopnm.c 2012-04-09 15:40:03.191619939 +0200 +@@ -1279,7 +1279,9 @@ convertRasterByRows(pnmOut * const + if (scanbuf == NULL) + pm_error("can't allocate memory for scanline buffer"); + +- 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"); + +diff -up netpbm-10.58.01/converter/other/xwdtopnm.c.security-code netpbm-10.58.01/converter/other/xwdtopnm.c +--- netpbm-10.58.01/converter/other/xwdtopnm.c.security-code 2012-04-09 15:31:40.000000000 +0200 ++++ netpbm-10.58.01/converter/other/xwdtopnm.c 2012-04-09 15:40:03.192619927 +0200 +@@ -209,6 +209,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; + *bits_per_itemP = 16; +@@ -634,6 +638,7 @@ processX11Header(X11WDFileHeader * cons + + *colsP = h11FixedP->pixmap_width; + *rowsP = h11FixedP->pixmap_height; ++ overflow2(h11FixedP->bytes_per_line, 8); + *padrightP = + h11FixedP->bytes_per_line * 8 - + h11FixedP->pixmap_width * h11FixedP->bits_per_pixel; +diff -up netpbm-10.58.01/converter/pbm/mdatopbm.c.security-code netpbm-10.58.01/converter/pbm/mdatopbm.c +--- netpbm-10.58.01/converter/pbm/mdatopbm.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/mdatopbm.c 2012-04-09 15:40:03.192619927 +0200 +@@ -245,10 +245,13 @@ main(int argc, char **argv) { + pm_readlittleshort(infile, &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); + +diff -up netpbm-10.58.01/converter/pbm/mgrtopbm.c.security-code netpbm-10.58.01/converter/pbm/mgrtopbm.c +--- netpbm-10.58.01/converter/pbm/mgrtopbm.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/mgrtopbm.c 2012-04-09 15:40:03.193619915 +0200 +@@ -65,6 +65,8 @@ readMgrHeader(FILE * const ifP, + if (head.h_high < ' ' || head.l_high < ' ') + pm_error("Invalid width field in MGR header"); + ++ overflow_add(*colsP, pad); ++ + *colsP = (((int)head.h_wide - ' ') << 6) + ((int)head.l_wide - ' '); + *rowsP = (((int)head.h_high - ' ') << 6) + ((int) head.l_high - ' '); + *padrightP = ( ( *colsP + pad - 1 ) / pad ) * pad - *colsP; +diff -up netpbm-10.58.01/converter/pbm/pbmtogem.c.security-code netpbm-10.58.01/converter/pbm/pbmtogem.c +--- netpbm-10.58.01/converter/pbm/pbmtogem.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtogem.c 2012-04-09 15:40:03.193619915 +0200 +@@ -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)); +diff -up netpbm-10.58.01/converter/pbm/pbmtogo.c.security-code netpbm-10.58.01/converter/pbm/pbmtogo.c +--- netpbm-10.58.01/converter/pbm/pbmtogo.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtogo.c 2012-04-09 15:40:03.193619915 +0200 +@@ -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; +diff -up netpbm-10.58.01/converter/pbm/pbmtolj.c.security-code netpbm-10.58.01/converter/pbm/pbmtolj.c +--- netpbm-10.58.01/converter/pbm/pbmtolj.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtolj.c 2012-04-09 15:40:03.194619902 +0200 +@@ -120,7 +120,11 @@ parseCommandLine(int argc, char ** argv, + 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; + +diff -up netpbm-10.58.01/converter/pbm/pbmtomacp.c.security-code netpbm-10.58.01/converter/pbm/pbmtomacp.c +--- netpbm-10.58.01/converter/pbm/pbmtomacp.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtomacp.c 2012-04-09 15:40:03.195619889 +0200 +@@ -101,6 +101,7 @@ char *argv[]; + if( !lflg ) + left = 0; + ++ overflow_add(left, MAX_COLS - 1); + if( rflg ) + { if( right - left >= MAX_COLS ) + right = left + MAX_COLS - 1; +@@ -111,6 +112,8 @@ char *argv[]; + if( !tflg ) + top = 0; + ++ overflow_add(top, MAX_LINES - 1); ++ + if( bflg ) + { if( bottom - top >= MAX_LINES ) + bottom = top + MAX_LINES - 1; +diff -up netpbm-10.58.01/converter/pbm/pbmtomda.c.security-code netpbm-10.58.01/converter/pbm/pbmtomda.c +--- netpbm-10.58.01/converter/pbm/pbmtomda.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtomda.c 2012-04-09 15:40:03.195619889 +0200 +@@ -179,6 +179,7 @@ int main(int argc, char **argv) + + nOutRowsUnrounded = bScale ? nInRows/2 : nInRows; + ++ overflow_add(nOutRowsUnrounded, 3); + nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4; + /* MDA wants rows a multiple of 4 */ + nOutCols = nInCols / 8; +diff -up netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c.security-code netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c +--- netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c 2012-04-09 15:40:03.195619889 +0200 +@@ -105,6 +105,7 @@ int pbm_readline(pbm_stat* pbm,unsigned + return 0; + + case P4: ++ overflow_add(pbm->width, 7); + tmp=(pbm->width+7)/8; + tmp2=fread(data,1,tmp,pbm->fptr); + if(tmp2 == tmp) +@@ -129,7 +130,8 @@ void pbm_unreadline (pbm_stat *pbm, void + return; + + pbm->unread = 1; +- pbm->revdata = malloc ((pbm->width+7)/8); ++ overflow_add(pbm->width, 7); ++ pbm->revdata = malloc((pbm->width+7)/8); + memcpy (pbm->revdata, data, (pbm->width+7)/8); + pbm->current_line--; + } +diff -up netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c.security-code netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c +--- netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c 2012-04-09 15:40:03.196619876 +0200 +@@ -441,6 +441,7 @@ main(int argc, char *argv[]) { + pm_error("main(): unrecognized parameter '%s'", argv[argn]); + } + ++ overflow_add(Width, 7); + Pwidth=(Width+7)/8; + printer.fptr=out; + +diff -up netpbm-10.58.01/converter/pbm/pbmtoxbm.c.security-code netpbm-10.58.01/converter/pbm/pbmtoxbm.c +--- netpbm-10.58.01/converter/pbm/pbmtoxbm.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtoxbm.c 2012-04-09 15:40:03.196619876 +0200 +@@ -335,6 +335,8 @@ convertRaster(FILE * const ifP, + + unsigned char * bitrow; + unsigned int row; ++ ++ overflow_add(cols, padright); + + putinit(xbmVersion); + +diff -up netpbm-10.58.01/converter/pbm/pbmtoybm.c.security-code netpbm-10.58.01/converter/pbm/pbmtoybm.c +--- netpbm-10.58.01/converter/pbm/pbmtoybm.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtoybm.c 2012-04-09 15:40:03.197619863 +0200 +@@ -113,6 +113,7 @@ main(int argc, const char *argv[]) { + bitrow = pbm_allocrow(cols); + + /* Compute padding to round cols up to the nearest multiple of 16. */ ++ overflow_add(cols, 16); + padright = ((cols + 15) / 16) * 16 - cols; + + putinit(cols, rows); +diff -up netpbm-10.58.01/converter/pbm/pbmtozinc.c.security-code netpbm-10.58.01/converter/pbm/pbmtozinc.c +--- netpbm-10.58.01/converter/pbm/pbmtozinc.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmtozinc.c 2012-04-09 15:40:03.197619863 +0200 +@@ -65,6 +65,7 @@ main(int argc, char * argv[]) { + bitrow = pbm_allocrow( cols ); + + /* Compute padding to round cols up to the nearest multiple of 16. */ ++ overflow_add(cols, 16); + padright = ( ( cols + 15 ) / 16 ) * 16 - cols; + + printf( "USHORT %s[] = {\n",name); +diff -up netpbm-10.58.01/converter/pbm/pbmto10x.c.security-code netpbm-10.58.01/converter/pbm/pbmto10x.c +--- netpbm-10.58.01/converter/pbm/pbmto10x.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmto10x.c 2012-04-09 15:40:03.197619863 +0200 +@@ -162,7 +162,7 @@ main(int argc, char * argv[]) { + res_60x72(); + + pm_close(ifp); +- exit(0); ++ return 0; + } + + +diff -up netpbm-10.58.01/converter/pbm/pbmto4425.c.security-code netpbm-10.58.01/converter/pbm/pbmto4425.c +--- netpbm-10.58.01/converter/pbm/pbmto4425.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pbmto4425.c 2012-04-09 15:40:03.198619851 +0200 +@@ -2,6 +2,7 @@ + + #include "nstring.h" + #include "pbm.h" ++#include + + static char bit_table[2][3] = { + {1, 4, 0x10}, +@@ -160,7 +161,7 @@ main(int argc, char * argv[]) { + xres = vmap_width * 2; + yres = vmap_height * 3; + +- vmap = malloc(vmap_width * vmap_height * sizeof(char)); ++ vmap = malloc3(vmap_width, vmap_height, sizeof(char)); + if(vmap == NULL) + { + pm_error( "Cannot allocate memory" ); +diff -up netpbm-10.58.01/converter/pbm/pktopbm.c.security-code netpbm-10.58.01/converter/pbm/pktopbm.c +--- netpbm-10.58.01/converter/pbm/pktopbm.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/pktopbm.c 2012-04-09 15:40:03.198619851 +0200 +@@ -277,6 +277,7 @@ main(int argc, char *argv[]) { + if (flagbyte == 7) { /* long form preamble */ + integer packetlength = get32() ; /* character packet length */ + car = get32() ; /* character number */ ++ overflow_add(packetlength, pktopbm_pkloc); + endofpacket = packetlength + pktopbm_pkloc; + /* calculate end of packet */ + if ((car >= MAXPKCHAR) || !filename[car]) { +diff -up netpbm-10.58.01/converter/pbm/thinkjettopbm.l.security-code netpbm-10.58.01/converter/pbm/thinkjettopbm.l +--- netpbm-10.58.01/converter/pbm/thinkjettopbm.l.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/thinkjettopbm.l 2012-04-09 15:40:03.199619839 +0200 +@@ -114,7 +114,9 @@ DIG [0-9] + \033\*b{DIG}+W { + int l; + if (rowCount >= rowCapacity) { ++ overflow_add(rowCapacity, 100); + rowCapacity += 100; ++ overflow2(rowCapacity, sizeof *rows); + rows = realloc (rows, rowCapacity * sizeof *rows); + if (rows == NULL) + pm_error ("Out of memory."); +@@ -226,6 +228,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); +diff -up netpbm-10.58.01/converter/pbm/ybmtopbm.c.security-code netpbm-10.58.01/converter/pbm/ybmtopbm.c +--- netpbm-10.58.01/converter/pbm/ybmtopbm.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/converter/pbm/ybmtopbm.c 2012-04-09 15:40:03.199619839 +0200 +@@ -49,6 +49,7 @@ getinit(FILE * const ifP, + pm_error("EOF / read error"); + + *depthP = 1; ++ overflow_add(*colsP, 15); + *padrightP = ((*colsP + 15) / 16) * 16 - *colsP; + } + +diff -up netpbm-10.58.01/converter/pgm/lispmtopgm.c.security-code netpbm-10.58.01/converter/pgm/lispmtopgm.c +--- netpbm-10.58.01/converter/pgm/lispmtopgm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/pgm/lispmtopgm.c 2012-04-09 15:40:03.199619839 +0200 +@@ -58,6 +58,7 @@ main( argc, argv ) + pm_error( "depth (%d bits) is too large", depth); + + pgm_writepgminit( stdout, cols, rows, (gray) maxval, 0 ); ++ overflow_add(cols, 7); + grayrow = pgm_allocrow( ( cols + 7 ) / 8 * 8 ); + + for ( row = 0; row < rows; ++row ) +@@ -102,7 +103,9 @@ getinit( file, colsP, rowsP, depthP, pad + + if ( *depthP == 0 ) + *depthP = 1; /* very old file */ +- ++ ++ overflow_add((int)colsP, 31); ++ + *padrightP = ( ( *colsP + 31 ) / 32 ) * 32 - *colsP; + + if ( *colsP != (cols_32 - *padrightP) ) { +diff -up netpbm-10.58.01/converter/pgm/psidtopgm.c.security-code netpbm-10.58.01/converter/pgm/psidtopgm.c +--- netpbm-10.58.01/converter/pgm/psidtopgm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/pgm/psidtopgm.c 2012-04-09 15:40:03.200619827 +0200 +@@ -78,6 +78,7 @@ main(int argc, + pm_error("bits/sample (%d) is too large.", bitspersample); + + pgm_writepgminit(stdout, cols, rows, maxval, 0); ++ overflow_add(cols, 7); + grayrow = pgm_allocrow((cols + 7) / 8 * 8); + for (row = 0; row < rows; ++row) { + unsigned int col; +diff -up netpbm-10.58.01/converter/ppm/ilbmtoppm.c.security-code netpbm-10.58.01/converter/ppm/ilbmtoppm.c +--- netpbm-10.58.01/converter/ppm/ilbmtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/ilbmtoppm.c 2012-04-09 15:40:03.201619815 +0200 +@@ -592,6 +592,7 @@ decode_row(FILE * const ifP, + rawtype *chp; + + cols = bmhdP->w; ++ overflow_add(cols, 15); + bytes = RowBytes(cols); + for( plane = 0; plane < nPlanes; plane++ ) { + int mask; +@@ -679,6 +680,23 @@ decode_mask(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(cmap, row, palchange) +@@ -1341,6 +1359,9 @@ dcol_to_ppm(FILE * const ifP, + if( redmaxval != maxval || greenmaxval != maxval || bluemaxval != maxval ) + pm_message("scaling colors to %d bits", pm_maxvaltobits(maxval)); + ++ overflow_add(redmaxval, 1); ++ overflow_add(greenmaxval, 1); ++ overflow_add(bluemaxval, 1); + MALLOCARRAY_NOFAIL(redtable, redmaxval +1); + MALLOCARRAY_NOFAIL(greentable, greenmaxval +1); + MALLOCARRAY_NOFAIL(bluetable, bluemaxval +1); +@@ -1763,7 +1784,9 @@ PCHG_ConvertSmall(PCHG, cmap, mask, data + ChangeCount32 = *data++; + datasize -= 2; + ++ overflow_add(ChangeCount16, ChangeCount32); + changes = ChangeCount16 + ChangeCount32; ++ overflow_add(changes, 1); + for( i = 0; i < changes; i++ ) { + if( totalchanges >= PCHG->TotalChanges ) goto fail; + if( datasize < 2 ) goto fail; +@@ -2028,6 +2051,9 @@ read_pchg(FILE * const ifp, + cmap->mp_change[i] = NULL; + if( PCHG.StartLine < 0 ) { + int nch; ++ if(PCHG.MaxReg < PCHG.MinReg) ++ pm_error("assert: MinReg > MaxReg"); ++ overflow_add(PCHG.MaxReg-PCHG.MinReg, 2); + nch = PCHG.MaxReg - PCHG.MinReg +1; + MALLOCARRAY_NOFAIL(cmap->mp_init, nch + 1); + for( i = 0; i < nch; i++ ) +@@ -2104,6 +2130,7 @@ process_body( FILE * const ifp, + if( typeid == ID_ILBM ) { + int isdeep; + ++ overflow_add(bmhdP->w, 15); + MALLOCARRAY_NOFAIL(ilbmrow, RowBytes(bmhdP->w)); + *viewportmodesP |= fakeviewport; /* -isham/-isehb */ + +diff -up netpbm-10.58.01/converter/ppm/imgtoppm.c.security-code netpbm-10.58.01/converter/ppm/imgtoppm.c +--- netpbm-10.58.01/converter/ppm/imgtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/imgtoppm.c 2012-04-09 15:40:03.202619802 +0200 +@@ -84,6 +84,7 @@ main(int argc, char ** argv) { + len = atoi((char*) buf ); + if ( fread( buf, len, 1, ifp ) != 1 ) + pm_error( "bad colormap buf" ); ++ overflow2(cmaplen, 3); + if ( cmaplen * 3 != len ) + { + pm_message( +@@ -105,6 +106,7 @@ main(int argc, 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 (%d) does not match image size (%d)", +diff -up netpbm-10.58.01/converter/ppm/Makefile.security-code netpbm-10.58.01/converter/ppm/Makefile +--- netpbm-10.58.01/converter/ppm/Makefile.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/Makefile 2012-04-09 15:40:03.202619802 +0200 +@@ -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 \ +diff -up netpbm-10.58.01/converter/ppm/pcxtoppm.c.security-code netpbm-10.58.01/converter/ppm/pcxtoppm.c +--- netpbm-10.58.01/converter/ppm/pcxtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/pcxtoppm.c 2012-04-09 15:40:03.203619789 +0200 +@@ -409,6 +409,7 @@ pcx_planes_to_pixels(pixels, bitplanes, + /* + * clear the pixel buffer + */ ++ overflow2(bytesperline, 8); + npixels = (bytesperline * 8) / bitsperpixel; + p = pixels; + while (--npixels >= 0) +@@ -470,6 +471,7 @@ pcx_16col_to_ppm(FILE * const ifP, + } + + /* BytesPerLine should be >= BitsPerPixel * cols / 8 */ ++ overflow2(BytesPerLine, 8); + rawcols = BytesPerLine * 8 / BitsPerPixel; + if (headerCols > rawcols) { + pm_message("warning - BytesPerLine = %d, " +diff -up netpbm-10.58.01/converter/ppm/picttoppm.c.security-code netpbm-10.58.01/converter/ppm/picttoppm.c +--- netpbm-10.58.01/converter/ppm/picttoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/picttoppm.c 2012-04-09 15:40:03.205619763 +0200 +@@ -1,3 +1,5 @@ ++#error "Unfixable. Don't ship me" ++ + /* + * picttoppm.c -- convert a MacIntosh PICT file to PPM format. + * +diff -up netpbm-10.58.01/converter/ppm/pjtoppm.c.security-code netpbm-10.58.01/converter/ppm/pjtoppm.c +--- netpbm-10.58.01/converter/ppm/pjtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/pjtoppm.c 2012-04-09 15:40:03.206619751 +0200 +@@ -127,19 +127,21 @@ main(argc, argv) + case 'V': /* send plane */ + case 'W': /* send last plane */ + if (rows == -1 || r >= rows || image == NULL) { +- if (rows == -1 || r >= rows) ++ if (rows == -1 || r >= rows) { ++ overflow_add(rows, 100); + rows += 100; ++ } + if (image == NULL) { +- MALLOCARRAY(image, rows * planes); +- MALLOCARRAY(imlen, rows * planes); ++ image = (unsigned char **) ++ malloc3(rows , planes , sizeof(unsigned char *)); ++ imlen = (int *) malloc3(rows , planes, sizeof(int)); + } + else { ++ overflow2(rows,planes); + image = (unsigned char **) +- realloc(image, +- rows * planes * ++ realloc2(image, rows * planes, + sizeof(unsigned char *)); +- imlen = (int *) +- realloc(imlen, rows * planes * sizeof(int)); ++ imlen = (int *) realloc2(imlen, rows * planes, sizeof(int)); + } + } + if (image == NULL || imlen == NULL) +@@ -212,8 +214,10 @@ main(argc, argv) + for (i = 0, c = 0; c < imlen[p + r * planes]; c += 2) + for (cmd = image[p + r * planes][c], + val = image[p + r * planes][c+1]; +- cmd >= 0 && i < newcols; cmd--, i++) ++ cmd >= 0 && i < newcols; cmd--, i++) { + buf[i] = val; ++ overflow_add(i, 1); ++ } + cols = cols > i ? cols : i; + free(image[p + r * planes]); + /* +@@ -224,6 +228,7 @@ main(argc, argv) + image[p + r * planes] = (unsigned char *) realloc(buf, i); + } + } ++ overflow2(cols, 8); + cols *= 8; + } + +diff -up netpbm-10.58.01/converter/ppm/ppmtoeyuv.c.security-code netpbm-10.58.01/converter/ppm/ppmtoeyuv.c +--- netpbm-10.58.01/converter/ppm/ppmtoeyuv.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/ppmtoeyuv.c 2012-04-09 15:40:03.206619751 +0200 +@@ -114,6 +114,7 @@ create_multiplication_tables(const pixva + + int index; + ++ overflow_add(maxval, 1); + MALLOCARRAY_NOFAIL(mult299 , maxval+1); + MALLOCARRAY_NOFAIL(mult587 , maxval+1); + MALLOCARRAY_NOFAIL(mult114 , maxval+1); +diff -up netpbm-10.58.01/converter/ppm/ppmtoicr.c.security-code netpbm-10.58.01/converter/ppm/ppmtoicr.c +--- netpbm-10.58.01/converter/ppm/ppmtoicr.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/ppmtoicr.c 2012-04-09 15:40:03.207619739 +0200 +@@ -169,7 +169,7 @@ char* argv[]; + + if (rleflag) { + pm_message("sending run-length encoded picture data ..." ); +- testimage = (char*) malloc(rows*cols); ++ testimage = (char*) malloc2(rows, cols); + p = testimage; + for (i=0; i PCL_MAXVAL) + pm_error("color range too large; reduce with ppmcscale"); ++ if (cols < 0 || rows < 0) ++ pm_error("negative size is not possible"); + + /* Figure out the colormap. */ + pm_message("Computing colormap..."); +@@ -296,6 +298,8 @@ main(int argc, const char * argv[]) { + case 0: /* direct mode (no palette) */ + bpp = bitsperpixel(maxval); /* bits per pixel */ + bpg = bpp; bpb = bpp; ++ overflow2(bpp, 3); ++ overflow_add(bpp*3, 7); + bpp = (bpp*3+7)>>3; /* bytes per pixel now */ + bpr = (bpp<<3)-bpg-bpb; + bpp *= cols; /* bytes per row now */ +@@ -305,9 +309,13 @@ main(int argc, const char * argv[]) { + case 3: case 7: pclindex++; + default: + bpp = 8/pclindex; ++ overflow_add(cols, bpp); ++ if(bpp == 0) ++ pm_error("assert: no bpp"); + bpp = (cols+bpp-1)/bpp; /* bytes per row */ + } + } ++ overflow2(bpp,2); + inrow = (char *)malloc((unsigned)bpp); + outrow = (char *)malloc((unsigned)bpp*2); + runcnt = (signed char *)malloc((unsigned)bpp); +diff -up netpbm-10.58.01/converter/ppm/ppmtowinicon.c.security-code netpbm-10.58.01/converter/ppm/ppmtowinicon.c +--- netpbm-10.58.01/converter/ppm/ppmtowinicon.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/ppmtowinicon.c 2012-04-09 15:40:03.213619664 +0200 +@@ -12,6 +12,7 @@ + + #include + #include ++#include + + #include "pm_c_util.h" + #include "winico.h" +@@ -219,6 +220,7 @@ createAndBitmap (gray ** const ba, int c + MALLOCARRAY_NOFAIL(rowData, rows); + icBitmap->xBytes = xBytes; + icBitmap->data = rowData; ++ overflow2(xBytes, rows); + icBitmap->size = xBytes * rows; + for (y=0;yxBytes = xBytes; + icBitmap->data = rowData; ++ overflow2(xBytes, rows); + icBitmap->size = xBytes * rows; + + for (y=0;yxBytes = xBytes; + icBitmap->data = rowData; ++ overflow2(xBytes, rows); + icBitmap->size = xBytes * rows; + + for (y=0;ybitcount = bpp; + entry->ih = createInfoHeader(entry, xorBitmap, andBitmap); + entry->colors = palette->colors; ++ overflow2(4, entry->color_count); ++ overflow_add(xorBitmap->size, andBitmap->size); ++ overflow_add(xorBitmap->size + andBitmap->size, 40); ++ overflow_add(xorBitmap->size + andBitmap->size + 40, 4 * entry->color_count); + entry->size_in_bytes = + xorBitmap->size + andBitmap->size + 40 + (4 * entry->color_count); + if (verbose) +diff -up netpbm-10.58.01/converter/ppm/ppmtoxpm.c.security-code netpbm-10.58.01/converter/ppm/ppmtoxpm.c +--- netpbm-10.58.01/converter/ppm/ppmtoxpm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/ppmtoxpm.c 2012-04-09 15:40:03.214619651 +0200 +@@ -197,6 +197,7 @@ genNumstr(unsigned int const input, int + unsigned int i; + + /* Allocate memory for printed number. Abort if error. */ ++ overflow_add(digits, 1); + if (!(str = (char *) malloc(digits + 1))) + pm_error("out of memory"); + +@@ -314,6 +315,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("Out of memory allocating %u bytes for a color map.", +diff -up netpbm-10.58.01/converter/ppm/qrttoppm.c.security-code netpbm-10.58.01/converter/ppm/qrttoppm.c +--- netpbm-10.58.01/converter/ppm/qrttoppm.c.security-code 2012-04-09 15:31:42.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/qrttoppm.c 2012-04-09 15:40:03.215619638 +0200 +@@ -46,7 +46,7 @@ main( argc, argv ) + + ppm_writeppminit( stdout, cols, rows, maxval, 0 ); + pixelrow = ppm_allocrow( cols ); +- buf = (unsigned char *) malloc( 3 * cols ); ++ buf = (unsigned char *) malloc2( 3 , cols ); + if ( buf == (unsigned char *) 0 ) + pm_error( "out of memory" ); + +diff -up netpbm-10.58.01/converter/ppm/sldtoppm.c.security-code netpbm-10.58.01/converter/ppm/sldtoppm.c +--- netpbm-10.58.01/converter/ppm/sldtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/sldtoppm.c 2012-04-09 15:40:03.216619626 +0200 +@@ -455,6 +455,8 @@ slider(slvecfn slvec, + + /* Allocate image buffer and clear it to black. */ + ++ overflow_add(ixdots,1); ++ overflow_add(iydots,1); + pixels = ppm_allocarray(pixcols = ixdots + 1, pixrows = iydots + 1); + PPM_ASSIGN(rgbcolor, 0, 0, 0); + ppmd_filledrectangle(pixels, pixcols, pixrows, pixmaxval, 0, 0, +diff -up netpbm-10.58.01/converter/ppm/ximtoppm.c.security-code netpbm-10.58.01/converter/ppm/ximtoppm.c +--- netpbm-10.58.01/converter/ppm/ximtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/ximtoppm.c 2012-04-09 15:40:03.216619626 +0200 +@@ -117,6 +117,7 @@ ReadXimHeader(FILE * const in_fp, + header->bits_channel = atoi(a_head.bits_per_channel); + header->alpha_flag = atoi(a_head.alpha_channel); + if (strlen(a_head.author)) { ++ overflow_add(strlen(a_head.author),1); + if (!(header->author = calloc((unsigned int)strlen(a_head.author)+1, + 1))) { + pm_message("ReadXimHeader: can't calloc author string" ); +@@ -126,6 +127,7 @@ ReadXimHeader(FILE * const in_fp, + strncpy(header->author, a_head.author, strlen(a_head.author)); + } + if (strlen(a_head.date)) { ++ overflow_add(strlen(a_head.date),1); + if (!(header->date =calloc((unsigned int)strlen(a_head.date)+1,1))){ + pm_message("ReadXimHeader: can't calloc date string" ); + return(0); +@@ -134,6 +136,7 @@ ReadXimHeader(FILE * const in_fp, + strncpy(header->date, a_head.date, strlen(a_head.date)); + } + if (strlen(a_head.program)) { ++ overflow_add(strlen(a_head.program),1); + if (!(header->program = calloc( + (unsigned int)strlen(a_head.program) + 1, 1))) { + pm_message("ReadXimHeader: can't calloc program string" ); +@@ -160,6 +163,7 @@ ReadXimHeader(FILE * const in_fp, + if (header->nchannels == 3 && header->bits_channel == 8) + header->ncolors = 0; + else if (header->nchannels == 1 && header->bits_channel == 8) { ++ overflow2(header->ncolors, sizeof(Color)); + header->colors = (Color *)calloc((unsigned int)header->ncolors, + sizeof(Color)); + if (header->colors == NULL) { +diff -up netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code netpbm-10.58.01/converter/ppm/yuvtoppm.c +--- netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200 ++++ netpbm-10.58.01/converter/ppm/yuvtoppm.c 2012-04-09 15:40:03.218619602 +0200 +@@ -72,6 +72,7 @@ main(argc, argv) + + ppm_writeppminit(stdout, cols, rows, (pixval) 255, 0); + pixrow = ppm_allocrow(cols); ++ overflow_add(cols, 1); + MALLOCARRAY(yuvbuf, (cols+1)/2); + if (yuvbuf == NULL) + pm_error("Unable to allocate YUV buffer for %d columns.", cols); +diff -up netpbm-10.58.01/editor/pamcut.c.security-code netpbm-10.58.01/editor/pamcut.c +--- netpbm-10.58.01/editor/pamcut.c.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/pamcut.c 2012-04-09 15:40:03.218619602 +0200 +@@ -655,6 +655,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; + +diff -up netpbm-10.58.01/editor/pbmreduce.c.security-code netpbm-10.58.01/editor/pbmreduce.c +--- netpbm-10.58.01/editor/pbmreduce.c.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/pbmreduce.c 2012-04-09 15:40:03.219619590 +0200 +@@ -94,6 +94,7 @@ main( argc, argv ) + if (halftone == QT_FS) { + unsigned int col; + /* Initialize Floyd-Steinberg. */ ++ overflow_add(newcols, 2); + MALLOCARRAY(thiserr, newcols + 2); + MALLOCARRAY(nexterr, newcols + 2); + if (thiserr == NULL || nexterr == NULL) +diff -up netpbm-10.58.01/editor/pnmgamma.c.security-code netpbm-10.58.01/editor/pnmgamma.c +--- netpbm-10.58.01/editor/pnmgamma.c.security-code 2012-04-09 15:31:34.000000000 +0200 ++++ netpbm-10.58.01/editor/pnmgamma.c 2012-04-09 15:40:03.220619577 +0200 +@@ -586,6 +586,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); +diff -up netpbm-10.58.01/editor/pnmhisteq.c.security-code netpbm-10.58.01/editor/pnmhisteq.c +--- netpbm-10.58.01/editor/pnmhisteq.c.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/pnmhisteq.c 2012-04-09 15:40:03.220619577 +0200 +@@ -103,6 +103,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", +diff -up netpbm-10.58.01/editor/pnmindex.csh.security-code netpbm-10.58.01/editor/pnmindex.csh +--- netpbm-10.58.01/editor/pnmindex.csh.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/pnmindex.csh 2012-04-09 15:40:03.221619564 +0200 +@@ -1,5 +1,8 @@ + #!/bin/csh -f + # ++echo "Unsafe code, needs debugging, do not ship" ++exit 1 ++# + # pnmindex - build a visual index of a bunch of anymaps + # + # Copyright (C) 1991 by Jef Poskanzer. +diff -up netpbm-10.58.01/editor/pnmpad.c.security-code netpbm-10.58.01/editor/pnmpad.c +--- netpbm-10.58.01/editor/pnmpad.c.security-code 2012-04-09 15:31:34.000000000 +0200 ++++ netpbm-10.58.01/editor/pnmpad.c 2012-04-09 15:40:03.221619564 +0200 +@@ -527,6 +527,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 (PNM_FORMAT_TYPE(format) == PBM_TYPE) +diff -up netpbm-10.58.01/editor/pnmremap.c.security-code netpbm-10.58.01/editor/pnmremap.c +--- netpbm-10.58.01/editor/pnmremap.c.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/pnmremap.c 2012-04-09 15:40:03.222619551 +0200 +@@ -409,7 +409,7 @@ initFserr(struct pam * const pamP, + unsigned int plane; + + unsigned int const fserrSize = pamP->width + 2; +- ++ overflow_add(pamP->width, 2); + fserrP->width = pamP->width; + + MALLOCARRAY(fserrP->thiserr, pamP->depth); +@@ -445,6 +445,7 @@ floydInitRow(struct pam * const pamP, st + + 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) +diff -up netpbm-10.58.01/editor/pnmscalefixed.c.security-code netpbm-10.58.01/editor/pnmscalefixed.c +--- netpbm-10.58.01/editor/pnmscalefixed.c.security-code 2012-04-09 15:31:34.000000000 +0200 ++++ netpbm-10.58.01/editor/pnmscalefixed.c 2012-04-09 15:40:03.223619538 +0200 +@@ -214,6 +214,8 @@ compute_output_dimensions(const struct c + const int rows, const int cols, + int * newrowsP, int * newcolsP) { + ++ overflow2(rows, cols); ++ + if (cmdline.pixels) { + if (rows * cols <= cmdline.pixels) { + *newrowsP = rows; +@@ -265,6 +267,8 @@ compute_output_dimensions(const struct c + + if (*newcolsP < 1) *newcolsP = 1; + if (*newrowsP < 1) *newrowsP = 1; ++ ++ overflow2(*newcolsP, *newrowsP); + } + + +@@ -446,6 +450,9 @@ main(int argc, char **argv ) { + unfilled. We can address that by stretching, whereas the other + case would require throwing away some of the input. + */ ++ ++ overflow2(newcols, SCALE); ++ overflow2(newrows, SCALE); + sxscale = SCALE * newcols / cols; + syscale = SCALE * newrows / rows; + +diff -up netpbm-10.58.01/editor/pnmshear.c.security-code netpbm-10.58.01/editor/pnmshear.c +--- netpbm-10.58.01/editor/pnmshear.c.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/pnmshear.c 2012-04-09 15:40:03.224619526 +0200 +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include "pm_c_util.h" + #include "ppm.h" +@@ -236,6 +237,11 @@ main(int argc, char * argv[]) { + + shearfac = fabs(tan(cmdline.angle)); + ++ if(rows * shearfac >= INT_MAX-1) ++ pm_error("image too large"); ++ ++ overflow_add(rows * shearfac, cols+1); ++ + newcols = rows * shearfac + cols + 0.999999; + + pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0); +diff -up netpbm-10.58.01/editor/ppmdither.c.security-code netpbm-10.58.01/editor/ppmdither.c +--- netpbm-10.58.01/editor/ppmdither.c.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/ppmdither.c 2012-04-09 15:40:03.224619526 +0200 +@@ -355,7 +355,11 @@ dithMatrix(unsigned int const dithPower) + unsigned int const dithMatSize = + (dithDim * sizeof(*dithMat)) + /* pointers */ + (dithDim * dithDim * sizeof(**dithMat)); /* data */ +- ++ ++ overflow2(dithDim, sizeof(*dithMat)); ++ overflow3(dithDim, dithDim, sizeof(**dithMat)); ++ overflow_add(dithDim * sizeof(*dithMat), dithDim * dithDim * sizeof(**dithMat)); ++ + dithMat = malloc(dithMatSize); + + if (dithMat == NULL) +diff -up netpbm-10.58.01/editor/specialty/pamoil.c.security-code netpbm-10.58.01/editor/specialty/pamoil.c +--- netpbm-10.58.01/editor/specialty/pamoil.c.security-code 2012-04-09 15:31:33.000000000 +0200 ++++ netpbm-10.58.01/editor/specialty/pamoil.c 2012-04-09 15:40:03.224619526 +0200 +@@ -112,6 +112,7 @@ main(int argc, char *argv[] ) { + tuples = pnm_readpam(ifp, &inpam, PAM_STRUCT_SIZE(tuple_type)); + pm_close(ifp); + ++ overflow_add(inpam.maxval, 1); + MALLOCARRAY(hist, inpam.maxval + 1); + if (hist == NULL) + pm_error("Unable to allocate memory for histogram."); +diff -up netpbm-10.58.01/generator/pbmtext.c.security-code netpbm-10.58.01/generator/pbmtext.c +--- netpbm-10.58.01/generator/pbmtext.c.security-code 2012-04-09 15:31:34.000000000 +0200 ++++ netpbm-10.58.01/generator/pbmtext.c 2012-04-09 15:40:03.225619514 +0200 +@@ -96,12 +96,14 @@ parseCommandLine(int argc, const char ** + + for (i = 1; i < argc; ++i) { + if (i > 1) { ++ overflow_add(totaltextsize, 1); + totaltextsize += 1; + text = realloc(text, totaltextsize); + if (text == NULL) + pm_error("out of memory allocating space for input text"); + strcat(text, " "); + } ++ overflow_add(totaltextsize, strlen(argv[i])); + totaltextsize += strlen(argv[i]); + text = realloc(text, totaltextsize); + if (text == NULL) +@@ -712,6 +714,7 @@ getText(const char cmdline_text + pm_error("A line of input text is longer than %u characters." + "Cannot process.", (unsigned)sizeof(buf)-1); + if (lineCount >= maxlines) { ++ overflow2(maxlines, 2); + maxlines *= 2; + REALLOCARRAY(text_array, maxlines); + if (text_array == NULL) +@@ -832,6 +835,7 @@ main(int argc, const char *argv[]) { + hmargin = fontP->maxwidth; + } else { + vmargin = fontP->maxheight; ++ overflow2(2, fontP->maxwidth); + hmargin = 2 * fontP->maxwidth; + } + } +diff -up netpbm-10.58.01/generator/pgmcrater.c.security-code netpbm-10.58.01/generator/pgmcrater.c +--- netpbm-10.58.01/generator/pgmcrater.c.security-code 2012-04-09 15:31:34.000000000 +0200 ++++ netpbm-10.58.01/generator/pgmcrater.c 2012-04-09 15:40:03.226619502 +0200 +@@ -130,7 +130,7 @@ static void gencraters() + /* Acquire the elevation array and initialize it to mean + surface elevation. */ + +- MALLOCARRAY(aux, SCRX * SCRY); ++ aux = (unsigned short *) malloc3(SCRX, SCRY, sizeof(short)); + if (aux == NULL) + pm_error("out of memory allocating elevation array"); + +diff -up netpbm-10.58.01/generator/pgmkernel.c.security-code netpbm-10.58.01/generator/pgmkernel.c +--- netpbm-10.58.01/generator/pgmkernel.c.security-code 2012-04-09 15:31:34.000000000 +0200 ++++ netpbm-10.58.01/generator/pgmkernel.c 2012-04-09 15:40:03.226619502 +0200 +@@ -68,7 +68,7 @@ main ( argc, argv ) + kycenter = (fysize - 1) / 2.0; + ixsize = fxsize + 0.999; + iysize = fysize + 0.999; +- MALLOCARRAY(fkernel, ixsize * iysize); ++ fkernel = (double *) malloc3 (ixsize, iysize, sizeof(double)); + for (i = 0; i < iysize; i++) + for (j = 0; j < ixsize; j++) { + fkernel[i*ixsize+j] = 1.0 / (1.0 + w * sqrt((double) +diff -up netpbm-10.58.01/lib/libpam.c.security-code netpbm-10.58.01/lib/libpam.c +--- netpbm-10.58.01/lib/libpam.c.security-code 2012-04-09 15:31:38.000000000 +0200 ++++ netpbm-10.58.01/lib/libpam.c 2012-04-09 15:40:03.227619490 +0200 +@@ -220,7 +220,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 -up netpbm-10.58.01/lib/libpammap.c.security-code netpbm-10.58.01/lib/libpammap.c +--- netpbm-10.58.01/lib/libpammap.c.security-code 2012-04-09 15:31:38.000000000 +0200 ++++ netpbm-10.58.01/lib/libpammap.c 2012-04-09 15:40:03.228619477 +0200 +@@ -104,6 +104,8 @@ allocTupleIntListItem(struct pam * const + */ + struct tupleint_list_item * retval; + ++ overflow2(pamP->depth, sizeof(sample)); ++ overflow_add(sizeof(*retval)-sizeof(retval->tupleint.tuple), pamP->depth*sizeof(sample)); + unsigned int const size = + sizeof(*retval) - sizeof(retval->tupleint.tuple) + + pamP->depth * sizeof(sample); +diff -up netpbm-10.58.01/lib/libpbm1.c.security-code netpbm-10.58.01/lib/libpbm1.c +--- netpbm-10.58.01/lib/libpbm1.c.security-code 2012-04-09 15:31:38.000000000 +0200 ++++ netpbm-10.58.01/lib/libpbm1.c 2012-04-09 15:40:03.228619477 +0200 +@@ -77,6 +77,7 @@ pbm_check(FILE * file, const enum pm_che + pm_message("pm_filepos passed to pm_check() is %u bytes", + sizeof(pm_filepos)); + #endif ++ overflow2(bytes_per_row, rows); + pm_check(file, check_type, need_raster_size, retval_p); + } + } +diff -up netpbm-10.58.01/lib/libpm.c.security-code netpbm-10.58.01/lib/libpm.c +--- netpbm-10.58.01/lib/libpm.c.security-code 2012-04-09 15:31:38.000000000 +0200 ++++ netpbm-10.58.01/lib/libpm.c 2012-04-09 15:40:03.229619464 +0200 +@@ -808,4 +808,53 @@ pm_parse_height(const char * const arg) + } + + ++/* ++ * 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); ++} + +diff -up netpbm-10.58.01/lib/pm.h.security-code netpbm-10.58.01/lib/pm.h +--- netpbm-10.58.01/lib/pm.h.security-code 2012-04-09 15:31:38.000000000 +0200 ++++ netpbm-10.58.01/lib/pm.h 2012-04-09 15:40:03.229619464 +0200 +@@ -432,4 +432,11 @@ pm_parse_height(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 +diff -up netpbm-10.58.01/other/pnmcolormap.c.security-code netpbm-10.58.01/other/pnmcolormap.c +--- netpbm-10.58.01/other/pnmcolormap.c.security-code 2012-04-09 15:31:32.000000000 +0200 ++++ netpbm-10.58.01/other/pnmcolormap.c 2012-04-09 15:40:03.230619451 +0200 +@@ -840,6 +840,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; +diff -up netpbm-10.58.01/urt/README.security-code netpbm-10.58.01/urt/README +--- netpbm-10.58.01/urt/README.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/README 2012-04-09 15:40:03.231619438 +0200 +@@ -18,3 +18,8 @@ in its initializer in the original. But + defines stdout as a variable, so that wouldn't compile. So I changed + it to NULL and added a line to rle_hdr_init to set that field to + 'stdout' dynamically. 2000.06.02 BJH. ++ ++Redid the code to check for maths overflows and other crawly horrors. ++Removed pipe through and compress support (unsafe) ++ ++Alan Cox +diff -up netpbm-10.58.01/urt/rle_addhist.c.security-code netpbm-10.58.01/urt/rle_addhist.c +--- netpbm-10.58.01/urt/rle_addhist.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/rle_addhist.c 2012-04-09 15:40:03.231619438 +0200 +@@ -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 +@@ -71,13 +73,19 @@ rle_addhist(char * argv[], + return; + + length = 0; +- for (i = 0; argv[i]; ++i) ++ for (i = 0; argv[i]; ++i) { ++ overflow_add(length, strlen(argv[i])); ++ overflow_add(length+1, strlen(argv[i])); + length += strlen(argv[i]) +1; /* length of each arg plus space. */ ++ } + + time(&temp); + timedate = ctime(&temp); + length += strlen(timedate); /* length of date and time in ASCII. */ + ++ 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; + /* length of padding, "on " and length of history name plus "="*/ + if (in_hdr) /* if we are interested in the old comments... */ +@@ -85,9 +93,12 @@ rle_addhist(char * argv[], + else + old = NULL; + +- if (old && *old) ++ if (old && *old) { ++ overflow_add(length, strlen(old)); + length += strlen(old); /* add length if there. */ ++ } + ++ overflow_add(length, 1); + ++length; /*Cater for the null. */ + + MALLOCARRAY(newc, length); +diff -up netpbm-10.58.01/urt/rle_getrow.c.security-code netpbm-10.58.01/urt/rle_getrow.c +--- netpbm-10.58.01/urt/rle_getrow.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/rle_getrow.c 2012-04-09 15:40:03.232619426 +0200 +@@ -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. +@@ -168,6 +170,7 @@ rle_get_setup(rle_hdr * const the_hdr) { + register char * cp; + + VAXSHORT( comlen, infile ); /* get comment length */ ++ overflow_add(comlen, 1); + evenlen = (comlen + 1) & ~1; /* make it even */ + if ( evenlen ) + { +diff -up netpbm-10.58.01/urt/rle_hdr.c.security-code netpbm-10.58.01/urt/rle_hdr.c +--- netpbm-10.58.01/urt/rle_hdr.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/rle_hdr.c 2012-04-09 15:40:03.233619414 +0200 +@@ -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. +@@ -80,7 +82,10 @@ int img_num; + /* Fill in with copies of the strings. */ + if ( the_hdr->cmd != pgmname ) + { +- char *tmp = (char *)malloc( strlen( pgmname ) + 1 ); ++ char *tmp ; ++ ++ overflow_add(strlen(pgmname), 1); ++ tmp = malloc( strlen( pgmname ) + 1 ); + RLE_CHECK_ALLOC( pgmname, tmp, 0 ); + strcpy( tmp, pgmname ); + the_hdr->cmd = tmp; +@@ -88,7 +93,9 @@ int img_num; + + if ( the_hdr->file_name != fname ) + { +- char *tmp = (char *)malloc( strlen( fname ) + 1 ); ++ char *tmp; ++ overflow_add(strlen(fname), 1); ++ tmp = malloc( strlen( fname ) + 1 ); + RLE_CHECK_ALLOC( pgmname, tmp, 0 ); + strcpy( tmp, fname ); + the_hdr->file_name = tmp; +@@ -153,6 +160,7 @@ rle_hdr *from_hdr, *to_hdr; + if ( to_hdr->bg_color ) + { + int size = to_hdr->ncolors * sizeof(int); ++ overflow2(to_hdr->ncolors, sizeof(int)); + to_hdr->bg_color = (int *)malloc( size ); + RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->bg_color, "background color" ); + memcpy( to_hdr->bg_color, from_hdr->bg_color, size ); +@@ -161,7 +169,7 @@ rle_hdr *from_hdr, *to_hdr; + if ( to_hdr->cmap ) + { + int size = to_hdr->ncmap * (1 << to_hdr->cmaplen) * sizeof(rle_map); +- to_hdr->cmap = (rle_map *)malloc( size ); ++ to_hdr->cmap = (rle_map *)malloc3( to_hdr->ncmap, 1<cmaplen, sizeof(rle_map)); + RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->cmap, "color map" ); + memcpy( to_hdr->cmap, from_hdr->cmap, size ); + } +@@ -174,11 +182,16 @@ rle_hdr *from_hdr, *to_hdr; + int size = 0; + CONST_DECL char **cp; + for ( cp=to_hdr->comments; *cp; cp++ ) ++ { ++ overflow_add(size, 1); + size++; /* Count the comments. */ ++ } + /* Check if there are really any comments. */ + if ( size ) + { ++ overflow_add(size, 1); + size++; /* Copy the NULL pointer, too. */ ++ overflow2(size, sizeof(char *)); + size *= sizeof(char *); + to_hdr->comments = (CONST_DECL char **)malloc( size ); + RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->comments, "comments" ); +diff -up netpbm-10.58.01/urt/rle.h.security-code netpbm-10.58.01/urt/rle.h +--- netpbm-10.58.01/urt/rle.h.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/rle.h 2012-04-09 15:40:03.233619414 +0200 +@@ -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. +@@ -160,6 +163,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. */ + +diff -up netpbm-10.58.01/urt/rle_open_f.c.security-code netpbm-10.58.01/urt/rle_open_f.c +--- netpbm-10.58.01/urt/rle_open_f.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/rle_open_f.c 2012-04-09 15:40:03.234619402 +0200 +@@ -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 + } + + +diff -up netpbm-10.58.01/urt/rle_putcom.c.security-code netpbm-10.58.01/urt/rle_putcom.c +--- netpbm-10.58.01/urt/rle_putcom.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/rle_putcom.c 2012-04-09 15:40:03.234619402 +0200 +@@ -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. +@@ -98,12 +100,14 @@ rle_putcom(const char * const value, + const char * v; + const char ** old_comments; + int i; +- for (i = 2, cp = the_hdr->comments; *cp != NULL; ++i, ++cp) ++ for (i = 2, cp = the_hdr->comments; *cp != NULL; ++i, ++cp) { ++ overflow_add(i, 1); + if (match(value, *cp) != NULL) { + v = *cp; + *cp = value; + return v; + } ++ } + /* Not found */ + /* Can't realloc because somebody else might be pointing to this + * comments block. Of course, if this were true, then the +diff -up netpbm-10.58.01/urt/Runput.c.security-code netpbm-10.58.01/urt/Runput.c +--- netpbm-10.58.01/urt/Runput.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/Runput.c 2012-04-09 15:40:03.235619390 +0200 +@@ -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. +@@ -202,9 +204,11 @@ RunSetup(rle_hdr * the_hdr) + if ( the_hdr->background != 0 ) + { + register int i; +- register rle_pixel *background = +- (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); ++ register rle_pixel *background; + register int *bg_color; ++ ++ overflow_add(the_hdr->ncolors,1); ++ background = (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); + /* + * If even number of bg color bytes, put out one more to get to + * 16 bit boundary. +@@ -224,7 +228,7 @@ RunSetup(rle_hdr * the_hdr) + /* Big-endian machines are harder */ + register int i, nmap = (1 << the_hdr->cmaplen) * + the_hdr->ncmap; +- register char *h_cmap = (char *)malloc( nmap * 2 ); ++ register char *h_cmap = (char *)malloc2( nmap, 2 ); + if ( h_cmap == NULL ) + { + fprintf( stderr, +diff -up netpbm-10.58.01/urt/scanargs.c.security-code netpbm-10.58.01/urt/scanargs.c +--- netpbm-10.58.01/urt/scanargs.c.security-code 2012-04-09 15:31:45.000000000 +0200 ++++ netpbm-10.58.01/urt/scanargs.c 2012-04-09 15:40:03.235619390 +0200 +@@ -38,6 +38,8 @@ + * + * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire + * to have all "void" functions so declared. ++ * ++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox + */ + + #include +@@ -63,8 +65,8 @@ typedef int *ptr; + /* + * Storage allocation macros + */ +-#define NEW( type, cnt ) (type *) malloc( (cnt) * sizeof( type ) ) +-#define RENEW( type, ptr, cnt ) (type *) realloc( ptr, (cnt) * sizeof( type ) ) ++#define NEW( type, cnt ) (type *) malloc2( (cnt) , sizeof( type ) ) ++#define RENEW( type, ptr, cnt ) (type *) realloc2( ptr, (cnt), sizeof( type ) ) + + static CONST_DECL char * prformat( CONST_DECL char *, int ); + static int isnum( CONST_DECL char *, int, int ); diff --git a/SOURCES/netpbm-security-scripts.patch b/SOURCES/netpbm-security-scripts.patch new file mode 100644 index 0000000..831be82 --- /dev/null +++ b/SOURCES/netpbm-security-scripts.patch @@ -0,0 +1,375 @@ +diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.05/converter/other/anytopnm +--- netpbm-10.47.05/converter/other/anytopnm.security-scripts 2009-12-10 08:34:36.000000000 +0100 ++++ netpbm-10.47.05/converter/other/anytopnm 2010-03-16 21:28:09.000000000 +0100 +@@ -510,10 +510,7 @@ else + inputFile="-" + fi + +-tempdir="${TMPDIR-/tmp}/anytopnm.$$" +-mkdir -m 0700 $tempdir || \ +- { echo "Could not create temporary file. Exiting."; exit 1;} +-trap 'rm -rf $tempdir' 0 ++tempdir=$(mktemp -d -t anytopnm.XXXXXXXXXX) || exit 1 + + # Take out all spaces + # Find the filename extension for last-ditch efforts later +@@ -539,9 +536,17 @@ if [ "$filetype" = "unknown" ]; then + echo "$progname: unknown file type. " \ + "'file' says mime type is '$mimeType', " 1>&2 + echo "type description is '$typeDescription'" 1>&2 ++ if [ -d "$tempdir" ] ; then ++ rm -rf "$tempdir" ++ fi ++ + exit 1 + fi + + convertIt $file $filetype + ++if [ -d "$tempdir" ] ; then ++ rm -rf "$tempdir" ++fi ++ + exit 0 +diff -up netpbm-10.47.05/editor/pamstretch-gen.security-scripts netpbm-10.47.05/editor/pamstretch-gen +--- netpbm-10.47.05/editor/pamstretch-gen.security-scripts 2009-12-10 08:34:32.000000000 +0100 ++++ netpbm-10.47.05/editor/pamstretch-gen 2010-03-16 21:28:47.000000000 +0100 +@@ -31,13 +31,9 @@ if [ "$1" = "" ]; then + exit 1 + fi + +-tempdir="${TMPDIR-/tmp}/pamstretch-gen.$$" +-mkdir -m 0700 $tempdir || \ +- { echo "Could not create temporary file. Exiting."; exit 1;} ++tempfile=$(mktemp /tmp/pnmig.XXXXXXXXXX) || exit 1 + trap 'rm -rf $tempdir' 0 1 3 15 + +-tempfile=$tempdir/pnmig +- + if ! cat $2 >$tempfile 2>/dev/null; then + echo 'pamstretch-gen: error reading file' 1>&2 + exit 1 +diff -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/editor/pnmmargin +--- netpbm-10.47.05/editor/pnmmargin.security-scripts 2009-12-10 08:34:32.000000000 +0100 ++++ netpbm-10.47.05/editor/pnmmargin 2010-03-16 21:28:09.000000000 +0100 +@@ -11,15 +11,11 @@ + # documentation. This software is provided "as is" without express or + # implied warranty. + +-tempdir="${TMPDIR-/tmp}/pnmmargin.$$" +-mkdir -m 0700 $tempdir || \ +- { echo "Could not create temporary file. Exiting." 1>&2; exit 1;} +-trap 'rm -rf $tempdir' 0 1 3 15 +- +-tmp1=$tempdir/pnmm1 +-tmp2=$tempdir/pnmm2 +-tmp3=$tempdir/pnmm3 +-tmp4=$tempdir/pnmm4 ++tmpdir=$(mktemp -d -t ppmmargin.XXXXXXX) || exit 1 ++tmp1="$tmpdir/tmp1" ++tmp2="$tmpdir/tmp2" ++tmp3="$tmpdir/tmp3" ++tmp4="$tmpdir/tmp4" + + color="-gofigure" + plainopt="" +@@ -90,6 +86,7 @@ else + -white | -black ) + pnmpad $plainopt $color \ + -left=$size -right=$size -top=$size -bottom=$size $tmp1 ++ rm -rf "$tmpdir" + exit + ;; + * ) +@@ -102,7 +99,4 @@ else + pnmcat -lr $tmp2 $tmp1 $tmp2 > $tmp4 + pnmcat -tb $plainopt $tmp3 $tmp4 $tmp3 + fi +- +- +- +- ++rm -rf "$tmpdir" +diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/ppmfade +--- netpbm-10.47.05/editor/ppmfade.security-scripts 2009-12-10 08:34:32.000000000 +0100 ++++ netpbm-10.47.05/editor/ppmfade 2010-03-16 21:28:09.000000000 +0100 +@@ -14,6 +14,7 @@ + # + #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + use strict; ++use File::Temp "tempdir"; + + my $SPREAD = 1; + my $SHIFT = 2; +@@ -111,20 +112,26 @@ if ($first_file ne "undefined") { + + print("Frames are " . $width . "W x " . $height . "H\n"); + ++# ++# We create a tmp-directory right here ++# ++my $tmpdir = tempdir("ppmfade.XXXXXX", CLEANUP => 1); ++ ++ + if ($first_file eq "undefined") { + print "Fading from black to "; +- system("ppmmake \\#000 $width $height >junk1$$.ppm"); ++ system("ppmmake \\#000 $width $height >$tmpdir/junk1$$.ppm"); + } else { + print "Fading from $first_file to "; +- system("cp", $first_file, "junk1$$.ppm"); ++ system("cp", $first_file, "$tmpdir/junk1$$.ppm"); + } + + if ($last_file eq "undefined") { + print "black.\n"; +- system("ppmmake \\#000 $width $height >junk2$$.ppm"); ++ system("ppmmake \\#000 $width $height >$tmpdir/junk2$$.ppm"); + } else { + print "$last_file\n"; +- system("cp", $last_file, "junk2$$.ppm"); ++ system("cp", $last_file, "$tmpdir/junk2$$.ppm"); + } + + # +@@ -132,14 +139,14 @@ if ($last_file eq "undefined") { + # + + # Here's what our temporary files are: +-# junk1$$.ppm: The original (fade-from) image +-# junk2$$.ppm: The target (fade-from) image +-# junk3$$.ppm: The frame of the fade for the current iteration of the +-# the for loop. +-# junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate +-# image to another, this is the first frame of that +-# sequence. +-# junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence ++# $tmpdir/junk1$$.ppm: The original (fade-from) image ++# $tmpdir/junk2$$.ppm: The target (fade-from) image ++# $tmpdir/junk3$$.ppm: The frame of the fade for the current iteration of the ++# the for loop. ++# $tmpdir/junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate ++# image to another, this is the first frame of that ++# sequence. ++# $tmpdir/junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence + + my $i; # Frame number + for ($i = 1; $i <= $nframes; $i++) { +@@ -147,147 +154,147 @@ for ($i = 1; $i <= $nframes; $i++) { + if ($mode eq $SPREAD) { + if ($i <= 10) { + my $n = $spline20[$i] * 100; +- system("ppmspread $n junk1$$.ppm >junk3$$.ppm"); ++ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm"); + } elsif ($i <= 20) { + my $n; + $n = $spline20[$i] * 100; +- system("ppmspread $n junk1$$.ppm >junk1a$$.ppm"); ++ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm"); + $n = (1-$spline20[$i-10]) * 100; +- system("ppmspread $n junk2$$.ppm >junk2a$$.ppm"); ++ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm"); + $n = $spline10[$i-10]; +- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + my $n = (1-$spline20[$i-10])*100; +- system("ppmspread $n junk2$$.ppm >junk3$$.ppm"); ++ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); + } + } elsif ($mode eq $SHIFT) { + if ($i <= 10) { + my $n = $spline20[$i] * 100; +- system("ppmshift $n junk1$$.ppm >junk3$$.ppm"); ++ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm"); + } elsif ($i <= 20) { + my $n; + $n = $spline20[$i] * 100; +- system("ppmshift $n junk1$$.ppm >junk1a$$.ppm"); ++ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm"); + $n = (1-$spline20[$i-10])*100; +- system("ppmshift $n junk2$$.ppm >junk2a$$.ppm"); ++ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm"); + $n = $spline10[$i-10]; +- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + my $n = (1-$spline20[$i-10]) * 100; +- system("ppmshift $n junk2$$.ppm >junk3$$.ppm"); ++ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); + } + } elsif ($mode eq $RELIEF) { + if ($i == 1) { +- system("ppmrelief junk1$$.ppm >junk1r$$.ppm"); ++ system("ppmrelief $tmpdir/junk1$$.ppm >$tmpdir/junk1r$$.ppm"); + } + if ($i <= 10) { + my $n = $spline10[$i]; +- system("ppmmix $n junk1$$.ppm junk1r$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1r$$.ppm >$tmpdir/junk3$$.ppm"); + } elsif ($i <= 20) { + my $n = $spline10[$i-10]; +- system("ppmmix $n junk1r$$.ppm junk2r$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1r$$.ppm $tmpdir/junk2r$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + my $n = $spline10[$i-20]; +- system("ppmmix $n junk2r$$.ppm junk2$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk2r$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); + } + if ($i == 10) { +- system("ppmrelief junk2$$.ppm >junk2r$$.ppm"); ++ system("ppmrelief $tmpdir/junk2$$.ppm >$tmpdir/junk2r$$.ppm"); + } + } elsif ($mode eq $OIL) { + if ($i == 1) { +- system("ppmtopgm junk1$$.ppm | pgmoil >junko$$.ppm"); +- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . +- ">junk1o$$.ppm"); ++ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmoil >$tmpdir/junko$$.ppm"); ++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . ++ ">$tmpdir/junk1o$$.ppm"); + } + if ($i <= 10) { + my $n = $spline10[$i]; +- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); + } elsif ($i <= 20) { + my $n = $spline10[$i-10]; +- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + my $n = $spline10[$i-20]; +- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); + } + if ($i == 10) { +- system("ppmtopgm junk2$$.ppm | pgmoil >junko$$.ppm"); +- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . +- ">junk2o$$.ppm"); ++ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmoil >$tmpdir/junko$$.ppm"); ++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . ++ ">$tmpdir/junk2o$$.ppm"); + } + } elsif ($mode eq $EDGE) { + if ($i == 1) { +- system("ppmtopgm junk1$$.ppm | pgmedge >junko$$.ppm"); +- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . +- ">junk1o$$.ppm"); ++ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmedge >$tmpdir/junko$$.ppm"); ++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . ++ ">$tmpdir/junk1o$$.ppm"); + } + if ($i <= 10) { + my $n = $spline10[$i]; +- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); + } elsif ($i <= 20) { + my $n = $spline10[$i-10]; +- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + my $n = $spline10[$i-20]; +- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); + } + if ($i == 10) { +- system("ppmtopgm junk2$$.ppm | pgmedge >junko$$.ppm"); +- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . +- ">junk2o$$.ppm"); ++ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmedge >$tmpdir/junko$$.ppm"); ++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . ++ ">$tmpdir/junk2o$$.ppm"); + } + } elsif ($mode eq $BENTLEY) { + if ($i == 1) { +- system("ppmtopgm junk1$$.ppm | pgmbentley >junko$$.ppm"); +- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . +- ">junk1o$$.ppm"); ++ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmbentley >$tmpdir/junko$$.ppm"); ++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . ++ ">$tmpdir/junk1o$$.ppm"); + } + if ($i <= 10) { + my $n = $spline10[$i]; +- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); + } elsif ($i <= 20) { + my $n = $spline10[$i-10]; +- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + my $n = $spline10[$i-20]; +- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); + } + if ($i == 10) { +- system("ppmtopgm junk2$$.ppm | pgmbentley >junko$$.ppm"); +- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . +- ">junk2o$$.ppm"); ++ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmbentley >$tmpdir/junko$$.ppm"); ++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . ++ ">$tmpdir/junk2o$$.ppm"); + } + } elsif ($mode eq $BLOCK) { + if ($i <= 10) { + my $n = 1 - 1.9*$spline20[$i]; +- system("pamscale $n junk1$$.ppm | " . +- "pamscale -width $width -height $height >junk3$$.ppm"); ++ system("pamscale $n $tmpdir/junk1$$.ppm | " . ++ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm"); + } elsif ($i <= 20) { + my $n = $spline10[$i-10]; +- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); ++ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + my $n = 1 - 1.9*$spline20[31-$i]; +- system("pamscale $n junk2$$.ppm | " . +- "pamscale -width $width -height $height >junk3$$.ppm"); ++ system("pamscale $n $tmpdir/junk2$$.ppm | " . ++ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm"); + } + if ($i == 10) { +- system("cp", "junk3$$.ppm", "junk1a$$.ppm"); +- system("pamscale $n junk2$$.ppm | " . +- "pamscale -width $width -height $height >junk2a$$.ppm"); ++ system("cp", "$tmpdir/junk3$$.ppm", "$tmpdir/junk1a$$.ppm"); ++ system("pamscale $n $tmpdir/junk2$$.ppm | " . ++ "pamscale -width $width -height $height >$tmpdir/junk2a$$.ppm"); + } + } elsif ($mode eq $MIX) { + my $fade_factor = sqrt(1/($nframes-$i+1)); +- system("ppmmix $fade_factor junk1$$.ppm junk2$$.ppm >junk3$$.ppm"); ++ system("ppmmix $fade_factor $tmpdir/junk1$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); + } else { + print("Internal error: impossible mode value '$mode'\n"); + } + + my $outfile = sprintf("%s.%04d.ppm", $base_name, $i); +- system("cp", "junk3$$.ppm", $outfile); ++ system("cp", "$tmpdir/junk3$$.ppm", $outfile); + } + + # + # Clean up shop. + # +-system("rm junk*$$.ppm"); ++system("rm $tmpdir/junk*$$.ppm"); + + exit(0); +diff -up netpbm-10.47.05/editor/ppmshadow.security-scripts netpbm-10.47.05/editor/ppmshadow +--- netpbm-10.47.05/editor/ppmshadow.security-scripts 2009-12-10 08:34:32.000000000 +0100 ++++ netpbm-10.47.05/editor/ppmshadow 2010-03-16 21:28:09.000000000 +0100 +@@ -72,9 +72,10 @@ sub makeConvolutionKernel($$) { + + + my $tmpdir = $ENV{TMPDIR} || "/tmp"; +-my $ourtmp = "$tmpdir/ppmshadow$$"; +-mkdir($ourtmp, 0777) or +- die("Unable to create directory for temporary files '$ourtmp"); ++my $ourtmp; chomp($ourtmp = `mktemp -d -t PPMshadow.XXXXXX`); ++if ($? >> 8) { ++ die "Can't create directory for temporary files"; ++} + + # Process command line options + diff --git a/SOURCES/netpbm-time.patch b/SOURCES/netpbm-time.patch new file mode 100644 index 0000000..680bf88 --- /dev/null +++ b/SOURCES/netpbm-time.patch @@ -0,0 +1,21 @@ +diff -up netpbm-10.47.05/converter/other/fiasco/config.h.time netpbm-10.47.05/converter/other/fiasco/config.h +--- netpbm-10.47.05/converter/other/fiasco/config.h.time 2009-12-10 08:34:36.000000000 +0100 ++++ netpbm-10.47.05/converter/other/fiasco/config.h 2009-12-10 08:43:54.000000000 +0100 +@@ -19,7 +19,7 @@ + #define STDC_HEADERS 1 + + /* Define if you can safely include both and . */ +-#define TIME_WITH_SYS_TIME 1 ++/* #undef TIME_WITH_SYS_TIME */ + + /* Define if the X Window System is missing or not being used. */ + #define X_DISPLAY_MISSING 1 +@@ -75,7 +75,7 @@ + #define HAVE_STRING_H 1 + + /* Define if you have the header file. */ +-#define HAVE_SYS_TIME_H 1 ++/* #undef HAVE_SYS_TIME_H */ + + /* Define if you have the header file. */ + #define HAVE_UNISTD_H 1 diff --git a/SOURCES/netpbm-xwdfix.patch b/SOURCES/netpbm-xwdfix.patch new file mode 100644 index 0000000..88626c7 --- /dev/null +++ b/SOURCES/netpbm-xwdfix.patch @@ -0,0 +1,11 @@ +--- netpbm-10.35/converter/other/xwdtopnm.c.xwdfix 2006-09-18 13:24:50.000000000 +0200 ++++ netpbm-10.35/converter/other/xwdtopnm.c 2006-09-18 13:27:26.000000000 +0200 +@@ -945,7 +945,7 @@ getpix(pixelReader * const rdrP) { + unsigned long const bitsToTakeMask = lsbmask[nBitsToTake]; + /* E.g. if nbitsToTake is 4, this is 0x0000000F */ + +- unsigned long bitsToTake; ++ unsigned int bitsToTake; + /* The actual bits we take, in the 'nBitsToTake' low bits */ + + assert(nBitsToTake <= 32); diff --git a/SPECS/netpbm.spec b/SPECS/netpbm.spec new file mode 100644 index 0000000..9f4e1c9 --- /dev/null +++ b/SPECS/netpbm.spec @@ -0,0 +1,1211 @@ +Summary: A library for handling different graphics file formats +Name: netpbm +Version: 10.61.02 +Release: 5%{?dist} +# See copyright_summary for details +License: BSD and GPLv2 and IJG and MIT and Public Domain +Group: System Environment/Libraries +URL: http://netpbm.sourceforge.net/ +# Source0 is prepared by +# svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced netpbm-%{version} +# svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/userguide netpbm-%{version}/userguide +# svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/trunk/test netpbm-%{version}/test +# and removing the .svn directories ( find -name "\.svn" -type d -print0 | xargs -0 rm -rf ) +# and removing the ppmtompeg code, due to patents ( rm -rf netpbm-%{version}/converter/ppm/ppmtompeg/ ) +Source0: netpbm-%{version}.tar.xz +Patch1: netpbm-time.patch +Patch2: netpbm-message.patch +Patch3: netpbm-security-scripts.patch +Patch4: netpbm-security-code.patch +Patch5: netpbm-nodoc.patch +Patch6: netpbm-gcc4.patch +Patch7: netpbm-bmptopnm.patch +Patch8: netpbm-CAN-2005-2471.patch +Patch9: netpbm-xwdfix.patch +Patch11: netpbm-multilib.patch +Patch13: netpbm-glibc.patch +Patch15: netpbm-docfix.patch +Patch16: netpbm-ppmfadeusage.patch +Patch17: netpbm-fiasco-overflow.patch +Patch20: netpbm-noppmtompeg.patch +Patch21: netpbm-cmuwtopbm.patch +Patch22: netpbm-pamtojpeg2k.patch +Patch23: netpbm-manfix.patch +Patch24: netpbm-ppmtopict.patch +Patch25: netpbm-pnmtopclxl.patch +#Patch26: netpbm-man-repeated.patch +Patch27: netpbm-multipage-pam.patch +Patch28: netpbm-compare-same-images.patch +#Patch29: netpbm-man-corrections.patch +Patch29: netpbm-manual-pages.patch +BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex +BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel + +%description +The netpbm package contains a library of functions which support +programs for handling various graphics file formats, including .pbm +(portable bitmaps), .pgm (portable graymaps), .pnm (portable anymaps), +.ppm (portable pixmaps) and others. + +%package devel +Summary: Development tools for programs which will use the netpbm libraries +Group: Development/Libraries +Requires: netpbm = %{version}-%{release} + +%description devel +The netpbm-devel package contains the header files and static libraries, +etc., for developing programs which can handle the various graphics file +formats supported by the netpbm libraries. + +Install netpbm-devel if you want to develop programs for handling the +graphics file formats supported by the netpbm libraries. You'll also need +to have the netpbm package installed. + +%package progs +Summary: Tools for manipulating graphics files in netpbm supported formats +Group: Applications/Multimedia +Requires: ghostscript +Requires: netpbm = %{version}-%{release} + +%description progs +The netpbm-progs package contains a group of scripts for manipulating the +graphics files in formats which are supported by the netpbm libraries. For +example, netpbm-progs includes the rasttopnm script, which will convert a +Sun rasterfile into a portable anymap. Netpbm-progs contains many other +scripts for converting from one graphics file format to another. + +If you need to use these conversion scripts, you should install +netpbm-progs. You'll also need to install the netpbm package. + +%package doc +Summary: Documentation for tools manipulating graphics files in netpbm supported formats +Group: Applications/Multimedia +Requires: netpbm-progs = %{version}-%{release} + +%description doc +The netpbm-doc package contains a documentation in HTML format for utilities +present in netpbm-progs package. + +If you need to look into the HTML documentation, you should install +netpbm-doc. You'll also need to install the netpbm-progs package. + +%prep +%setup -q +%patch1 -p1 -b .time +%patch2 -p1 -b .message +%patch3 -p1 -b .security-scripts +%patch4 -p1 -b .security-code +%patch5 -p1 -b .nodoc +%patch6 -p1 -b .gcc4 +%patch7 -p1 -b .bmptopnm +%patch8 -p1 -b .CAN-2005-2471 +%patch9 -p1 -b .xwdfix +%patch11 -p1 -b .multilib +%patch13 -p1 -b .glibc +%patch15 -p1 +%patch16 -p1 -b .ppmfadeusage +%patch17 -p1 -b .fiasco-overflow +%patch20 -p1 -b .noppmtompeg +%patch21 -p1 -b .cmuwtopbmfix +%patch22 -p1 -b .pamtojpeg2kfix +%patch23 -p1 -b .manfix +%patch24 -p1 -b .ppmtopict +%patch25 -p1 -b .pnmtopclxl +#%patch26 -p1 -b .man-repeated +%patch27 -p1 -b .multipage-pam +%patch28 -p1 -b .compare-same-images +#%patch29 -p1 -b .man-corrections +%patch29 -p1 -b .manual-pages +exit 0 + +sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in +rm -rf converter/other/jpeg2000/libjasper/ +sed -i -e 's/^SUBDIRS = libjasper/SUBDIRS =/' converter/other/jpeg2000/Makefile + +%build +./configure < pgmtopbm +chmod 0755 pgmtopbm +popd + +%check +pushd test +export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} +export PBM_TESTPREFIX=$RPM_BUILD_ROOT%{_bindir} +./Execute-Tests && exit 0 +popd + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc doc/copyright_summary doc/COPYRIGHT.PATENT doc/GPL_LICENSE.txt doc/HISTORY README +%{_libdir}/lib*.so.* + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/netpbm +%{_includedir}/netpbm/*.h +%{_libdir}/lib*.so +%{_mandir}/man3/* + +%files progs +%defattr(-,root,root) +%{_bindir}/* +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_datadir}/netpbm/ + +%files doc +%defattr(-,root,root) +%doc userguide/* + +%changelog +* Mon Jun 17 2013 Petr Hracek - 10.61.02-5 +- Manual page corrections (#948531) + +* Wed Jun 05 2013 Petr Hracek - 10.61.02-4 +- pnmpsnr: compare the same images failed (#969479) + +* Tue May 28 2013 Petr Hracek - 10.61.02-3 +- pnmtops: Multi-page PAM files correction (#833546) + +* Mon May 27 2013 Petr Hracek 10.61.02-2 +- Man page corrections (#948531) + +* Wed Feb 20 2013 Jindrich Novy 10.61.02-1 +- update to 10.61.02 + +* Thu Feb 14 2013 Fedora Release Engineering - 10.61.01-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Jan 21 2013 Adam Tkac - 10.61.01-2 +- rebuild due to "jpeg8-ABI" feature drop + +* Thu Jan 03 2013 Jindrich Novy 10.61.01-1 +- update to 10.61.01 +- sync patches + +* Fri Dec 14 2012 Jindrich Novy 10.60.05-1 +- update to 10.60.05 +- fixes pngtopam and ppmpat + +* Wed Dec 05 2012 Jindrich Novy 10.60.04-1 +- update to 10.60.04 +- fixes pamtotiff, pnmmontage, pnmpsnr, pbmpscale, pgmhist, + pampick, pamtompfont +- fix dates in changelog + +* Tue Nov 27 2012 Jindrich Novy 10.60.03-2 +- add upstream test suite + +* Wed Nov 21 2012 Jindrich Novy 10.60.03-1 +- update to 10.60.3 +- fixes xbmptopbm, pamtojpeg2k + +* Mon Oct 08 2012 Jindrich Novy 10.60.01-1 +- update to 10.60.01 +- fixes pamgauss, sunicontopnm + +* Tue Oct 02 2012 Jindrich Novy 10.60.00-1 +- update to 10.60.00 +- speeds up xpmtoppm + +* Tue Sep 25 2012 Jindrich Novy 10.59.03-1 +- update to 10.59.03 +- fixes xpmtoppm + +* Fri Jul 20 2012 Jindrich Novy 10.59.02-1 +- update to 10.59.02 +- fixes getline() glibc function conflict + +* Fri Jul 20 2012 Fedora Release Engineering - 10.59.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jul 11 2012 Jindrich Novy 10.59.01-1 +- update to 10.59.01 + +* Fri Jun 22 2012 Jindrich Novy 10.58.03-1 +- update to 10.58.03 +- pnmtops is back + +* Wed Jun 13 2012 Jindrich Novy 10.58.01-3 +- fix ppmtopict buffer underflow +- fix memory corruption in pnmtopclxl + +* Sun May 06 2012 Jindrich Novy 10.58.01-2 +- rebuild against new libtiff + +* Mon Apr 09 2012 Jindrich Novy 10.58.01-1 +- update to 10.58.01 + +* Mon Mar 12 2012 Jindrich Novy 10.57.04-1 +- update to 10.57.04 +- fixes ppmquantall + +* Fri Mar 02 2012 Jindrich Novy 10.57.03-1 +- update to 10.57.03 + +* Mon Feb 13 2012 Jindrich Novy 10.57.02-1 +- update to 10.57.02 + +* Tue Jan 17 2012 Jindrich Novy 10.57.01-1 +- update to 10.57.01 + +* Fri Jan 13 2012 Fedora Release Engineering - 10.56.05-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Dec 12 2011 Jindrich Novy 10.56.05-1 +- update to 10.56.05 +- fixes pamscale + +* Fri Nov 25 2011 Jindrich Novy 10.56.04-1 +- update to 10.56.04 +- fixes pngtopam +- use more robust way to create library symlinks + +* Wed Nov 16 2011 Jindrich Novy 10.56.03-2 +- fix library symlink to point to the new soname + +* Fri Nov 11 2011 Jindrich Novy 10.56.03-1 +- update to 10.56.03 +- fixes compilation against new libpng + +* Tue Sep 27 2011 Jindrich Novy 10.47.31-1 +- update to 10.47.31 +- fixes bmptopnm + +* Wed Aug 24 2011 Jindrich Novy 10.47.30-1 +- update to 10.47.30 +- fixes opacity in pnmtopng +- fixes pnmquant perl compatibility + +* Tue Jul 26 2011 Jindrich Novy 10.47.29-1 +- update to 10.47.29 + +* Tue Jun 28 2011 Jindrich Novy 10.47.28-1 +- update to 10.47.28 + +* Mon Mar 28 2011 Jindrich Novy 10.47.27-1 +- update to 10.47.27 +- fixes error message in g3topbm + documentation fixes + +* Tue Feb 08 2011 Fedora Release Engineering - 10.47.26-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Feb 7 2011 Jindrich Novy 10.47.26-1 +- update to 10.47.26 +- drop upstreamed asciitopgm patch + +* Mon Jan 17 2011 Jindrich Novy 10.47.25-1 +- update to 10.47.25 +- fix asciitopgm (#670082), thanks to Jonathan Kamens + +* Sat Jan 1 2011 Jindrich Novy 10.47.24-1 +- update to 10.47.24 + +* Tue Dec 14 2010 Jindrich Novy 10.47.23-1 +- update to 10.47.23 + +* Tue Oct 19 2010 Jindrich Novy 10.47.21-2 +- fix HTML pages from which man pages are now generated correctly (#644248) + +* Mon Oct 18 2010 Jindrich Novy 10.47.21-1 +- update to 10.47.21 + +* Fri Oct 1 2010 Jindrich Novy 10.47.20-1 +- update to 10.47.20 + +* Mon Aug 30 2010 Jindrich Novy 10.47.19-1 +- update to 10.47.19 + +* Sat Aug 14 2010 Jindrich Novy 10.47.18-1 +- update to 10.47.18 + +* Mon Jul 12 2010 Jindrich Novy 10.47.17-1 +- update to 10.47.17 + +* Fri Jun 18 2010 Jindrich Novy 10.47.16-1 +- update to 10.47.16 +- fixes pbmtext + +* Mon Jun 7 2010 Jindrich Novy 10.47.15-1 +- update to 10.47.15 + +* Tue Jun 1 2010 Jindrich Novy 10.47.14-2 +- add -fno-strict-aliasing to CFLAGS + +* Fri May 21 2010 Jindrich Novy 10.47.14-1 +- update to 10.47.14 +- fixes memory leak in pamarith + +* Tue May 4 2010 Jindrich Novy 10.47.13-1 +- update to 10.47.13 +- fixes pnmtops + +* Mon May 3 2010 Jindrich Novy 10.47.12-3 +- fix cmuwtopbm so that magic bytes test actually works +- fix pamtojpeg2k (don't close stdout twice) +- fix documentation for pamperspective and pbmtoepson + +* Wed Apr 28 2010 Jindrich Novy 10.47.12-2 +- fix CVE-2007-2721 (#501451) +- add missing man pages + +* Tue Apr 27 2010 Tom "spot" Callaway 10.47.12-1 +- update to 10.47.12 +- remove ppmtompeg, due to legal issues + +* Thu Mar 18 2010 Jindrich Novy 10.47.10-3 +- package docs in separate netpbm-doc package (#492437) +- don't package patch backups in documentation +- netpbm-progs package requires ghostscript + +* Wed Mar 17 2010 Jindrich Novy 10.47.10-2 +- pgmtopbm should generate PBM, not PAM file +- forwardport pnmmontage from 10.35 to make it work +- fix pamstretch-gen + +* Wed Feb 24 2010 Jindrich Novy 10.47.10-1 +- update to 10.47.10 +- fixes crash in pnmhistmap + +* Wed Feb 17 2010 Jindrich Novy 10.47.09-3 +- remove obsolete pgmtopbm and pnmcomp, symlink them to the new + compatible variants +- fix ppmfade -h, --help options +- add missing man pages +- link against -lz (#564649) + +* Wed Jan 27 2010 Jindrich Novy 10.47.09-2 +- fix buffer overflow in pnmtofiasco + +* Mon Jan 25 2010 Jindrich Novy 10.47.09-1 +- update to 10.47.09, fixes occassional crash in pamtosvg +- fix documentation +- fix ppmfade exit status + +* Wed Jan 13 2010 Jindrich Novy 10.47.08-1 +- update to 10.47.08 + +* Wed Dec 30 2009 Jindrich Novy 10.47.07-1 +- update to 10.47.07 + +* Mon Dec 14 2009 Jindrich Novy 10.47.06-1 +- update to 10.47.06 - fixes the dumb pamtosvg mistake in 10.47.05 +- pnmmargin won't create leftovers in /tmp (#547888) + +* Thu Dec 10 2009 Jindrich Novy 10.47.05-1 +- update to 10.47.05 +- fixes pnmtofiasco, fiascotopnm, pamtosvg, pamtouil and ppmrainbow +- upstream fix to pamtosvg caused netpbm not to be rebuildable on + any arch because of missing semicolon, the fix is now fixed :-/ + +* Mon Dec 7 2009 Jindrich Novy 10.47.04-3 +- fix segfault in pnmsmooth (#545089) + +* Fri Nov 27 2009 Jindrich Novy 10.47.04-2 +- fix ppmpat segfault when using -camo option (#541568) + +* Wed Oct 21 2009 Jindrich Novy 10.47.04-1 +- update to 10.47.04 (it is now stable) (#529525) + +* Fri Oct 9 2009 Jindrich Novy 10.35.68-1 +- update to 10.35.68 + +* Fri Sep 4 2009 Jindrich Novy 10.35.67-1 +- update to 10.35.67 +- fix configuration + +* Wed Jul 29 2009 Jindrich Novy 10.35.66-1 +- update to 10.35.66 +- sync svgatopam patch + +* Sat Jul 25 2009 Fedora Release Engineering - 10.35.65-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat Jun 27 2009 Jindrich Novy 10.35.65-1 +- update to 10.35.65 + +* Sun May 17 2009 Jindrich Novy 10.35.64-1 +- update to 10.35.64 +- fixes pnmremap, giftopnm, ppmpat, ppmdraw + +* Tue Apr 28 2009 Jindrich Novy 10.35.63-1 +- update to 10.35.63 +- basically new release with some of our patches applied upstream + +* Tue Apr 14 2009 Jindrich Novy 10.35.62-1 +- update to 10.35.62 +- upstream fixes pamstereogram +- fix options in pamperspective, pbmtoepson, ppmpat, pamaddnoise + so that they match their man pages (#483011, #483070, #483243, #483245) +- avoid clashes with getline() from glibc + +* Tue Mar 31 2009 Jindrich Novy 10.35.61-2 +- remove two hunks from security patch breaking pbmclean and pbmlife (#493015) +- fix ppmdfont and svgtopnm, thanks to Jiri Moskovcak + +* Mon Mar 23 2009 Jindrich Novy 10.35.61-1 +- update to 10.35.61 +- upstream fixes array bound violation in pbmtog3 +- drop .pbmtog3segfault patch, we fixed this some time ago already + and it is in upstream now +- use saner exit status in ppmfade + +* Thu Feb 26 2009 Jindrich Novy 10.35.60-3 +- fix broken perl syntax in ppmfade +- fix exit status and error reporting in ppmrainbow + +* Wed Feb 25 2009 Fedora Release Engineering - 10.35.60-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 16 2009 Jindrich Novy 10.35.60-1 +- update to 10.35.60 +- update .security patch, minor cleanup +- fixes xwdtopnm for at least some direct color 24/32 images +- fixes memory leak and out of memory crash in libpammap + +* Thu Jan 29 2009 Jindrich Novy 10.35.59-1 +- update to 10.35.59 +- fixes array bound violation in ilbmtoppm +- fixes garbage output when input in fitstopnm is little endian + floating point FITS + +* Wed Jan 28 2009 Jindrich Novy 10.35.58-4 +- fix segfault in ximtoppm (#482891), the utility lacked the + command line parsing initialization code + +* Thu Jan 22 2009 Jindrich Novy 10.35.58-3 +- fix cmuwmtopbm and other utilities by making endianess + functions work correctly on 64bit systems (#476863) + +* Wed Jan 21 2009 Jindrich Novy 10.35.58-2 +- fix pnmtofiasco to accept image from stdin (#476989, #227283) + +* Mon Jan 19 2009 Jindrich Novy 10.35.58-1 +- update to 10.35.38 +- fixes crashes in picttoppm, pbmtomrf, mrftopbm +- fixes bugs in leaftoppm, ilbmtoppm + +* Tue Dec 23 2008 Jindrich Novy 10.35.57-3 +- unbreak ppmshadow and ppmrainbow (#476989) +- pnmmontage won't crash because of uninitialized memory usage + +* Fri Dec 19 2008 Jindrich Novy 10.35.57-2 +- fix segfault in pamtosvg caused by not reverting "sentinel value" (#476989) + +* Mon Dec 15 2008 Jindrich Novy 10.35.57-1 +- update to 10.35.57 + +* Thu Nov 6 2008 Jindrich Novy 10.35.55-1 +- update to 10.35.55 + +* Mon Oct 27 2008 Jindrich Novy 10.35.54-1 +- update to 10.35.54 +- adds better randomization for ppmforge, pgmnoise, pgmcrater +- fixes array bounds violation in pnm_createBlackTuple() with PBM, PGM +- fixes crash in pnmtoddif with any PGM input + +* Tue Oct 14 2008 Jindrich Novy 10.35.53-1 +- update to 10.35.53 +- fixes pamditherbw (-value parameter other than .5 with -fs) + +* Sat Sep 27 2008 Jindrich Novy 10.35.52-1 +- update to 10.35.52 +- fixes crash of libppmd/ppmdraw when line is completely out of frame + +* Thu Sep 18 2008 Jindrich Novy 10.35.51-1 +- update to netpbm-10.35.51 +- make it actually compilable by removing duplicated function + in pamcomp.c + +* Wed Aug 27 2008 Jindrich Novy 10.35.49-2 +- link against system jasper instead of embedded one (#460300) + +* Thu Aug 14 2008 Jindrich Novy 10.35.49-1 +- update to 10.35.49 +- fixes crash in pamcut when cutting a region entirely to the + left or right of the input image, with -pad + +* Mon Aug 11 2008 Tom "spot" Callaway 10.35.48-2 +- fix license tag + +* Mon Aug 4 2008 Jindrich Novy 10.35.48-1 +- update to 10.35.48 +- fixes buffer overrun in pamperspective and pngtopnm output format +- update .security2 patch so that it applies with fuzz==0 + +* Tue Jun 24 2008 Jindrich Novy 10.35.46-1 +- update to 10.35.46 +- fixes pbmtext, pamtotga, pamtouil and pnmtopclxl + +* Mon Jun 9 2008 Jindrich Novy 10.35.45-1 +- update to 10.35.45 +- fixes anytopnm, pamtohtmltbl, xvminitoppm, pbmtogo, tgatoppm + +* Mon May 26 2008 Jindrich Novy 10.35.44-1 +- update to 10.35.44 +- fixes pamscale PBM input with -nomix, pamtilt crash + +* Mon May 12 2008 Jindrich Novy 10.35.43-1 +- update to 10.35.43 +- fixes pbmtext and documentation of pamthreshold + +* Mon Apr 14 2008 Jindrich Novy 10.35.42-1 +- update to 10.35.42 +- fixes pnmnorm, resolution of conflicting -wpercent and -wvalue + +* Mon Mar 31 2008 Jindrich Novy 10.35.41-1 +- update to 10.35.41 (fixes pnmnorm and gcc-4.3 build) + +* Fri Mar 14 2008 Jindrich Novy 10.35.40-2 +- package rgb.txt for pnmtopng (#313301) +- drop useless xorg-x11-server-utils BR + +* Sun Mar 9 2008 Jindrich Novy 10.35.40-1 +- update to 10.35.40 (fixes pgmdeshadow, pgmmedian, pgmbentley and pamtosvg) + +* Mon Feb 25 2008 Jindrich Novy 10.35.39-1 +- update to 10.35.39 (fixes crash in pamtosvg) + +* Thu Feb 14 2008 Jindrich Novy 10.35.38-1 +- update to 10.35.38 (fixes to pbmtext and ppmtoarbtxt) +- fix to let it built with gcc 4.3 + +* Thu Jan 17 2008 Jindrich Novy 10.35.37-1 +- update to 10.35.37 + +* Mon Dec 31 2007 Jindrich Novy 10.35.36-1 +- update to 10.35.36 + +* Thu Dec 13 2007 Jindrich Novy 10.35.35-1 +- update to 10.35.35 + +* Mon Nov 26 2007 Jindrich Novy 10.35.34-1 +- update to 10.35.34 +- sync security patch and fix typos + +* Wed Nov 14 2007 Jindrich Novy 10.35.33-1 +- update to 10.35.33 + +* Fri Nov 2 2007 Jindrich Novy 10.35.32-2 +- remove man pages that lacks corresponding binaries (#220739) + +* Thu Oct 18 2007 Jindrich Novy 10.35.32-1 +- remove .svn directories from tarball to reduce its size +- update fixes rhbz#337181 and likely others + +* Thu Oct 18 2007 MATSUURA Takanori 10.35.32-0 +- update to 10.35.32 from svn tree +- create man pages from userguide HTML files + +* Thu Oct 11 2007 Jindrich Novy 10.35-17 +- add xorg-x11-server-utils BR (#313301) + +* Thu Aug 23 2007 Jindrich Novy 10.35-16 +- rebuild for ppc32 +- fix open() calls so that netpbm builds with new glibc + +* Mon Aug 20 2007 Jindrich Novy 10.35-15 +- fix .ppmquantall patch (#207799) +- merge cmapsize with bmptopnm patch (#224554) + +* Mon Jul 16 2007 Jindrich Novy 10.35-14 +- /usr/share/netpbm is no more unowned (#248300) + +* Wed Jun 20 2007 Jindrich Novy 10.35-13 +- package map files needed by pnmtopalm (#244983) + +* Thu Mar 29 2007 Jindrich Novy 10.35-12 +- merge review fixes (#226191), thanks to Jason Tibbitts + +* Fri Feb 2 2007 Jindrich Novy 10.35-11 +- fix pbmtomacp buffer overflow (#226969) + +* Mon Jan 29 2007 Jindrich Novy 10.35-10 +- bmptopnm won't crash with "BMPlencolormap: internal error!" (#224554) + +* Thu Dec 28 2006 Jindrich Novy 10.35-9 +- pbmtog3 won't segfault on 64bit arches (#220739) + +* Tue Dec 19 2006 Jindrich Novy 10.35-8 +- remove bogus man pages (#220112, #220113) +- overflow2() no more conflicts with libgd.so (#216116) +- fix BuildRoot + +* Thu Oct 12 2006 Jindrich Novy 10.35-7 +- remove note about OSL 1 licensing from COPYRIGHT.PATENT file + +* Mon Oct 2 2006 Jesse Keating 10.35-6 +- rebuild for new libpng, again. + +* Mon Oct 2 2006 Jesse Keating 10.35-5 +- rebuild for new libpng + +* Mon Oct 2 2006 Jindrich Novy 10.35-4 +- rebuild (#208866) + +* Fri Sep 29 2006 Jindrich Novy 10.35-3 +- remove OSL 1.1 from security patch (#208587) + +* Sun Sep 24 2006 Jindrich Novy 10.35-2 +- fix ppmquantall (#207799), thanks to Steve Grubb + +* Mon Sep 18 2006 Jindrich Novy 10.35-1 +- update to 10.35 +- drop .pnmtopng, .rgbtxt patches, fixed upstream +- sync .xwidfix, .ppmtompeg patches +- regenerate man pages + +* Thu Sep 14 2006 Jindrich Novy 10.34-8 +- readd pbmtols, author claims it's LGPL (#202519) +- add .l1 suffixes to tarball names to reflect legal fixes + in the upstream release with the same NVR + +* Wed Sep 13 2006 Jindrich Novy 10.34-7 +- rebuild + +* Thu Sep 7 2006 Jindrich Novy 10.34-6.fc6 +- regenerate man pages so that makewhatis isn't confused (#204991) + (upstream makeman script was broken -> now fixed) + +* Mon Sep 4 2006 Jindrich Novy 10.34-5.fc6 +- readd spottopgm, author claims it's GPL (#202519) + +* Tue Aug 15 2006 Jindrich Novy 10.34-4.fc6 +- legal fixes (#202519): +- remove pbmtols, spottopgm, jbig and hpcd stuff from source + and doc tarballs + +* Sat Aug 12 2006 Jindrich Novy 10.34-3.fc6 +- pamscale won't waste all system resources by usage of uninitialized + variables for output image resolution (#199871) +- use %%{?dist} + +* Wed Jul 19 2006 Jindrich Novy 10.34-2 +- fix double free corruption in ppmtompeg (#199409), + thanks to Milan Zazrivec + +* Wed Jul 12 2006 Jesse Keating - 10.34-1.1 +- rebuild + +* Thu Jun 22 2006 Jindrich Novy 10.34-1 +- update to 10.34 +- drop .ppmtogif, .nstring patches +- remove some overflow checks from .security patch, it's + now resolved in the new upstream version +- don't use svgalib by default (don't compile/ship ppmsvgalib) +- don't compile svgtopam because of the libxml dependency +- add BuildRequires libX11-devel +- fix build on x86_64 and ppc64 + +* Mon Jun 5 2006 Jindrich Novy 10.33-3 +- fix multilib conflict (#192735) +- remove jbigtopnm man page + +* Fri Apr 14 2006 Jindrich Novy 10.33-2 +- fix image corruption in ppmtogif, thanks to Gilles Detillieux (#188597) +- fix nsting.h to let pnmtopng and other utilities using seekable opening + mode work on x86_64 (#188594) + +* Wed Apr 5 2006 Jindrich Novy 10.33-1 +- update to 10.33 +- drop upstreamed .ppmdepth patch +- fix segfault in ppmtompeg when encoding jpeg images (#185970) + +* Mon Apr 3 2006 Jindrich Novy 10.32-2 +- fix broken symlink in upstream: pnmsdepth -> pamdepth (#187667) + +* Tue Feb 28 2006 Jindrich Novy 10.32-1 +- update to 10.32 +- drop .msbmp patch, applied upstream +- sync the rest of the patches +- regenerate man pages + +* Mon Feb 20 2006 Jindrich Novy 10.31-5 +- add missing flex BuildRequires +- fix anytopnm to recognize ms-bmp files (#182060) + +* Tue Feb 14 2006 Jindrich Novy 10.31-4 +- make xwdtopnm work on x86_64 (#181001) + +* Fri Feb 10 2006 Jesse Keating - 10.31-3.1 +- bump again for double-long bug on ppc(64) + +* Fri Feb 10 2006 Jindrich Novy 10.31-3 +- fix segfault caused by usage of uninitialized variables while + parsing cmdline arguments in pnmtopng (#179645) +- add validity check for date/time in pnmtopng +- fix unchecked sscanf reads + +* Tue Feb 07 2006 Jesse Keating - 10.31-2.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Wed Jan 18 2006 Jindrich Novy 10.31-2 +- rebuild to have greater version than in FC4 (#177698) + +* Fri Dec 30 2005 Jindrich Novy 10.31-1 +- update to 10.31 +- update security patch +- regenerate man pages + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Tue Nov 29 2005 Jindrich Novy 10.30-2 +- fix path to rgb.txt to fit modular X (#174128) + +* Fri Oct 21 2005 Jindrich Novy 10.30-1 +- update to 10.30 +- update manpath, gcc4 patches +- update security patch - fixed length problem in rle_addhist +- update partly upstreamed bmptopnm, pnmtopng patches +- drop manpath patch +- regenerate man pages + +* Thu Oct 06 2005 Jindrich Novy 10.29-2 +- fix segfault in pnmtopng caused by referencing a NULL pointer (#169532) + +* Tue Aug 16 2005 Jindrich Novy 10.29-1 +- update to 10.29 +- drop upstreamed .libpm, .pnmtojpeg, .pbmtolj patches +- update .CAN-2005-2471 patch + +* Mon Aug 15 2005 Jindrich Novy 10.28-6 +- link libnetpbm.so against -lm (#165980) + +* Tue Aug 09 2005 Jindrich Novy 10.28-5 +- fix CAN-2005-2471, unsafe gs calls from pstopnm (#165355) + +* Thu Jul 21 2005 Jindrich Novy 10.28-4 +- fix buffer overflow in pbmtolj (#163596) + +* Mon Jun 27 2005 Jindrich Novy 10.28-3 +- create symlink pnmtopnm -> pamtopnm, this works now in + netpbm-10.28 (#161436) + +* Tue Jun 21 2005 Jindrich Novy 10.28-2 +- fix segfault in pbmtolj caused by unchecked assertions + caused by definition of NDEBUG (#160429) +- drop hunk from .security patch causing dual inclusion + of string.h in pbmtolj.c + +* Fri Jun 10 2005 Jindrich Novy 10.28-1 +- update to 10.28 +- regenerated man pages +- sync .security, .security2, .badlink, .libpm, .gcc4 patches +- drop upstreamed .pngtopnm, .pnmcolormap patches + +* Tue May 31 2005 Jindrich Novy 10.27-4 +- fix segfault in pnmcolormap what makes latex2html/ppmquant + unusable (#158665, #139111) + +* Mon May 16 2005 Jindrich Novy 10.27-3 +- fix ppmdither leak caused by bug in security patch (#157757) +- drop gcc34 patch + +* Mon May 09 2005 Jindrich Novy 10.27-2 +- fix invalid strcmp condition in bmptopnm, typo in pnmtojpeg + (David Constanzo, #157106, #157118) +- proper read longs and shorts in libpm.c (David Constanzo, #157110) +- fix segfault in bmptopnm caused by freeing an uninitialized pointer + +* Tue Mar 29 2005 Jindrich Novy 10.27-1 +- update to the new 10.27 release +- update .security2, .security patch +- regenerate man pages +- remove jbig, hpcd +- remove config_template from /usr +- don't create symlink to pamtopnm + +* Mon Mar 14 2005 Jindrich Novy 10.26.4-3 +- fix overflow checking of integers with incompatible endianess + causing problems using xwdtopnm (#147790) + +* Wed Mar 09 2005 Jindrich Novy 10.26.4-2 +- add .gcc4 patch to fix some missing declarations of headers, + some pointer signedness mismatches, remove xmalloc2 +- rebuilt with gcc4 + +* Thu Mar 03 2005 Jindrich Novy 10.26.4-1 +- update to netpbm-10.26.4, remove jbig, hpcd +- this version fixes #149924 +- regenerate man pages (don't include man pages without binaries - #146863) + +* Wed Jan 05 2005 Jindrich Novy 10.26-1 +- update to netpbm-10.26-1, remove jbig, hpcd +- regenerate man pages, remove man pages for non existent binaries +- update security patch, additional fixes +- drop upstreamed misc patch, merge malloc patch with security patch + +* Mon Oct 25 2004 Jindrich Novy 10.25-3 +- include man pages in troff format, thanks to Michal Jaegerman (#136959) +- drop bmpbpp patch, fixed upstream +- remove pcdovtoppm, ppmsvgalib, vidtoppm man pages because binaries + for them are not present (#136471) + +* Mon Oct 18 2004 Jindrich Novy 10.25-2 +- avoid compile crash when "-msse" is in CFLAGS + +* Mon Oct 18 2004 Jindrich Novy 10.25-1 +- update to latest upstream 10.25 +- drop initvar patch +- update security, misc patch +- add bmpbpp patch to use only appropriate bit depths for BMP (#135675) + +* Thu Sep 23 2004 Jindrich Novy 10.24-3 +- added patch to suppress installation of doc.url to /usr/bin #133346 + +* Wed Aug 18 2004 Jindrich Novy 10.24-2 +- added patch to fix compile crash for 64bit machines +- various hacks related to .security patch + +* Mon Aug 16 2004 Jindrich Novy 10.24-1 +- updated to 10.24 +- updated docs + +* Thu Aug 05 2004 Jindrich Novy 10.23-2 +- added pngtopnm patch +- added malloc patch + +* Tue Aug 03 2004 Jindrich Novy 10.23-1 +- updated to netpbm-10.23 upsteam (and removed jbig, hpcd) +- $TMPDIR patch removed, obsolete +- updated gcc34 patch +- removed nestedfunc patch, already applied in upstream version +- updated security patch to conform to 10.23 (mostly in ppmtompeg/frame.c) + +* Fri Jul 02 2004 Phil Knirsch 10.22-2 +- Fixed Zero byte allocation error in bmptopnm (#123169) +- Honour the $TMPDIR in ppmfade (#117247) +- Fixed nested function bug (#117377) +- Fixed several uninitialized variables (#117377) + +* Mon Jun 28 2004 Phil Knirsch 10.22-1 +- Update to latest upstream version 10.22 (also for docs). +- Removed jbig and hdcp code from tarball. + +* Sat Jun 19 2004 Alan Cox +- merged fix for pnmrotate crash freeing wrong number of rows + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 30 2004 Harald Hoyer - 10.19-7 +- fixed compilation with gcc34 + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Tue Feb 17 2004 Phil Knirsch 10.19-6 +- Fixed problem in pnmquant with GetOptions() and args/ARGV (#115788). + +* Fri Feb 13 2004 Elliot Lee 10.19-5 +- rebuilt + +* Tue Feb 10 2004 Phil Knirsch 10.19-4 +- Fixed several tmp vulnerabilities in scripts and apps. Based on Debian + security fix for netpbm-9.24. + +* Mon Feb 09 2004 Phil Knirsch 10.19-3 +- Included doc tarball with manpages (#114755). +- Fixed small manpage incorrectness (#84922). +- Fixed message from giftopnm (#114756). + +* Fri Jan 30 2004 Phil Knirsch 10.19-2 +- No need anymore to fix ppmfade and ppmshade. + +* Thu Jan 29 2004 Phil Knirsch 10.19-1 +- Major update to latest upstream version 10.19. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Fri Feb 28 2003 Phil Knirsch 9.24-11 +- Updated Alan's patch. + +* Wed Feb 19 2003 Phil Knirsch 9.24-10 +- Added big security patch by Alan Cox. + +* Wed Jan 22 2003 Tim Powers 9.24-9 +- rebuilt + +* Thu Dec 19 2002 Phil Knirsch 9.24-8 +- Removed print filters again as they are too dangerous. + +* Mon Dec 16 2002 Elliot Lee 9.24-7 +- Merge in hammer changes, rebuild + +* Sun Sep 08 2002 Arjan van de Ven +- fix for x86-64 + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Wed Jun 19 2002 Phil Knirsch 9.24-5 +- Don't forcibly strip binaries + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Apr 09 2002 Phil Knirsch 9.24-3 +- Fixed a possible gcc compiler problem for inline struct parameters (#62181). +- Added missing .map files to progs files selection (#61625). + +* Tue Apr 02 2002 Phil Knirsch 9.24-2 +- Fixed stupid dangling symlink problem (#62478) + +* Tue Mar 12 2002 Phil Knirsch 9.24-1 +- Updated to netpbm version 9.24 +- Hacked around a couple of library problems. + +* Tue Nov 06 2001 Phil Knirsch +- Updated to netpbm version 9.20 + +* Fri Jun 22 2001 Philipp Knirsch +- Updated to netpbm version 9.14 +- Removed pnmtotiff resize patch as it is now part of the original package +- Removed pstopnm csh fix as it is now part of the original package +- Removed asciitopgm memcpy fix as it is now part of the original package +- Removed manpages patch as it is now part of the original package + +* Mon Feb 12 2001 Philipp Knirsch +- Fixed bugzilla bug #26767 where the new glibc time and sys/time fixes needed + to be done. + +* Fri Feb 9 2001 Crutcher Dunnavant +- switched filters to printconf filters + +* Wed Jan 24 2001 Philipp Knirsch +- Fixed bugzilla bug #21644 where few manpages had a small error. + +* Tue Dec 19 2000 Philipp Knirsch +- Fixed bugzilla bug #19487 where asciitopgm dumped core on Alpha. Actually + dumped core everywhere + +* Tue Dec 19 2000 Philipp Knirsch +- update to 9.9 +- Due to patent infringement problems removed the jbig support from the tarball + (pnm/jbig + Makefile changes) and created a new tarball + +* Wed Oct 25 2000 Nalin Dahyabhai +- include shared libraries missing from previous build + +* Tue Oct 24 2000 Nalin Dahyabhai +- update to 9.8 +- make sure shhopt.h is included in the -devel package (#19672) +- rename shhopt.h to pbmshhopt.h because it's not the same as the normal + shhopt.h that other things (like util-linux) expect + +* Wed Aug 9 2000 Crutcher Dunnavant +- added a png-to-pnm.fpi filter + +* Wed Aug 2 2000 Matt Wilson +- rebuilt against new libpng + +* Mon Jul 17 2000 Nalin Dahyabhai +- move netpbm-progs to the Applications/Multimedia group +- reintroduce patches from the old libgr package + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Sat Jul 1 2000 Nalin Dahyabhai +- update to 9.5 + +* Tue Jun 27 2000 Nalin Dahyabhai +- update to 9.4 + +* Sat Jun 3 2000 Nalin Dahyabhai +- switch back to the netpbm tree, which is maintained again + +* Mon Feb 14 2000 Nalin Dahyabhai +- make sure all man pages are included (#9328) +- fix pstopnm bomb when xres == yres (#9329) +- add libjpeg and libz because libtiff now needs them + +* Wed Feb 02 2000 Nalin Dahyabhai +- added/updated TIFF compression patch from jik@kamens.brookline.ma.us (#8826) + +* Mon Dec 06 1999 Michael K. Johnson +- added TIFF resolution patch from jik@kamens.brookline.ma.us (#7589) + +* Mon Sep 20 1999 Michael K. Johnson +- added section 5 man pages + +* Fri Jul 30 1999 Bill Nottingham +- fix tiff-to-pnm.fpi (#4267) + +* Thu Jul 29 1999 Bill Nottingham +- add a pile of foo-to-bar.fpi filters (#4251) + +* Tue Mar 23 1999 Michael Johnson +- removed old png.h header file that was causing png utils to die +- build png in build instead of install section... + +* Mon Mar 22 1999 Bill Nottingham +- patch for 24-bit .BMP files (from sam@campbellsci.co.uk) + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 15) + +* Wed Jan 06 1999 Cristian Gafton +- clean up the spec file +- build for glibc 2.1 +- patch to fix pktopbm + +* Wed Jun 10 1998 Prospector System +- translations modified for de + +* Wed Jun 10 1998 Jeff Johnson +- glibc2 defines random in (pbm/pbmplus.h problem #693) + +* Thu May 07 1998 Prospector System +- translations modified for de, fr, tr + +* Thu May 07 1998 Cristian Gafton +- cleaned up the spec file a little bit +- validated mike's changes :-) + +* Wed May 6 1998 Michael Maher +- added pnm-to-ps.fpi that was missing from previous packages + +* Thu Apr 30 1998 Cristian Gafton +- altered install so that the package installs now even if a previous + version was not installed on the system + +* Thu Apr 16 1998 Erik Troan +- built against libpng 1.0 + +* Thu Nov 06 1997 Donnie Barnes +- changed copyright from "distributable" to "freeware" +- added some missing scripts that existed in netpbm +- added some binaries that weren't getting built +- added patch to build tiff manipulation progs (requires libtiff) + +* Wed Oct 15 1997 Donnie Barnes +- obsoletes netpbm now + +* Tue Oct 14 1997 Erik Troan +- mucked config.guess and Make.Rules to build on Alpha/Linux + +* Tue Oct 07 1997 Donnie Barnes +- updated to 2.0.13 +- dropped libjpeg and libtiff (those should come from home sources) +- removed glibc patch (new version appears to have it!) +- added i686 as a valid arch type to config.guess + +* Thu Jul 10 1997 Erik Troan +- built against glibc +