diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b5f66b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/netpbm-10.79.00.tar.xz diff --git a/.netpbm.metadata b/.netpbm.metadata new file mode 100644 index 0000000..b07f9d1 --- /dev/null +++ b/.netpbm.metadata @@ -0,0 +1 @@ +8ed7835000a9c915aed6ee33376375b737a0f979 SOURCES/netpbm-10.79.00.tar.xz 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-docfix.patch b/SOURCES/netpbm-docfix.patch new file mode 100644 index 0000000..33b3b77 --- /dev/null +++ b/SOURCES/netpbm-docfix.patch @@ -0,0 +1,124 @@ +diff -urNp old/userguide/cameratopam.html new/userguide/cameratopam.html +--- old/userguide/cameratopam.html 2017-09-05 09:05:16.000000000 +0200 ++++ new/userguide/cameratopam.html 2017-09-05 13:16:33.622352535 +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 -urNp old/userguide/fiascotopnm.html new/userguide/fiascotopnm.html +--- old/userguide/fiascotopnm.html 2017-09-05 09:05:16.000000000 +0200 ++++ new/userguide/fiascotopnm.html 2017-09-05 13:32:51.810458154 +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. +@@ -113,13 +113,8 @@ following methods (in the specified orde +
  • --config=name + + +-
    -h, --info +-
    +-Print brief help, then exit. +- +-
    -H, --help +-
    +-Print detailed help, then exit. ++
    -h, --help ++Print help, then exit. + + + +diff -urNp old/userguide/pamperspective.html new/userguide/pamperspective.html +--- old/userguide/pamperspective.html 2017-09-05 09:05:16.000000000 +0200 ++++ new/userguide/pamperspective.html 2017-09-05 13:23:15.869997105 +0200 +@@ -220,7 +220,7 @@ default rectangle as the "frame." The vi + 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 -urNp old/converter/pbm/pbmtoepson.c new/converter/pbm/pbmtoepson.c +--- old/converter/pbm/pbmtoepson.c 2018-01-04 14:26:14.740024843 +0100 ++++ new/converter/pbm/pbmtoepson.c 2018-01-04 14:28:47.970518766 +0100 +@@ -75,7 +75,7 @@ parseCommandLine(int ar + &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 -urNp old/userguide/pbmtoepson.html new/userguide/pbmtoepson.html +--- old/userguide/pbmtoepson.html 2018-01-04 14:26:14.586024719 +0100 ++++ new/userguide/pbmtoepson.html 2018-01-04 14:27:56.466847698 +0100 +@@ -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..54df85f --- /dev/null +++ b/SOURCES/netpbm-manfix.patch @@ -0,0 +1,184 @@ +diff -urNp old/userguide/avstopam.html new/userguide/avstopam.html +--- old/userguide/avstopam.html 2017-09-05 13:58:08.338559550 +0200 ++++ new/userguide/avstopam.html 2017-09-05 14:00:27.371039472 +0200 +@@ -1,8 +1,7 @@ + +- ++ + + Avstopam User Manual +- + + + +diff -urNp old/userguide/escp2topbm.html new/userguide/escp2topbm.html +--- old/userguide/escp2topbm.html 2017-09-05 13:58:08.335559561 +0200 ++++ new/userguide/escp2topbm.html 2017-09-05 14:01:20.226842694 +0200 +@@ -6,6 +6,7 @@ Updated: 14 July 2015 +
    + Table Of Contents + ++

    NAME

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

    SYNOPSIS

    +diff -urNp old/userguide/faxformat.html new/userguide/faxformat.html +--- old/userguide/faxformat.html 2017-09-05 13:58:08.337559553 +0200 ++++ new/userguide/faxformat.html 2017-09-05 14:02:33.322571279 +0200 +@@ -5,10 +5,11 @@ + 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 -urNp old/userguide/pampaintspill.html new/userguide/pampaintspill.html +--- old/userguide/pampaintspill.html 2017-09-05 13:58:08.338559550 +0200 ++++ new/userguide/pampaintspill.html 2017-09-05 14:03:32.625351620 +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 -urNp old/userguide/pamrecolor.html new/userguide/pamrecolor.html +--- old/userguide/pamrecolor.html 2017-09-05 13:58:08.336559557 +0200 ++++ new/userguide/pamrecolor.html 2017-09-05 14:04:34.714122098 +0200 +@@ -1,8 +1,7 @@ +- ++ + + + Pamrecolor User Manual +- + + + +@@ -11,7 +10,7 @@ + +

    Updated: 31 July 2010

    + +-

    Table Of Contents

    ++

    Table Of Contents

    + + +

    NAME

    +diff -urNp old/userguide/pamsistoaglyph.html new/userguide/pamsistoaglyph.html +--- old/userguide/pamsistoaglyph.html 2017-09-05 13:58:08.334559565 +0200 ++++ new/userguide/pamsistoaglyph.html 2017-09-05 14:05:25.865944327 +0200 +@@ -1,8 +1,7 @@ + +- ++ + + Pamsistoaglyph User Manual +- + + + +diff -urNp old/userguide/pamstereogram.html new/userguide/pamstereogram.html +--- old/userguide/pamstereogram.html 2017-09-05 13:58:08.337559553 +0200 ++++ new/userguide/pamstereogram.html 2017-09-05 14:13:28.523959069 +0200 +@@ -1,5 +1,5 @@ +- +- ++ ++ + + Pamstereogram User Manual + +@@ -10,7 +10,7 @@ + +

    Updated: 19 June 2015

    + +-

    Table Of Contents

    ++

    Table Of Contents

    + + +

    NAME

    +diff -urNp old/userguide/pamtoavs.html new/userguide/pamtoavs.html +--- old/userguide/pamtoavs.html 2017-09-05 13:58:08.329559583 +0200 ++++ new/userguide/pamtoavs.html 2017-09-05 14:05:49.299863901 +0200 +@@ -1,5 +1,5 @@ + +- ++ + + Pamtoavs User Manual + +diff -urNp old/userguide/pamtooctaveimg.html new/userguide/pamtooctaveimg.html +--- old/userguide/pamtooctaveimg.html 2017-09-05 13:58:08.335559561 +0200 ++++ new/userguide/pamtooctaveimg.html 2017-09-05 14:06:21.825752356 +0200 +@@ -1,8 +1,7 @@ + +- ++ + + Pamtooctaveimg User Manual +- + + + +diff -urNp old/userguide/pnmflip.html new/userguide/pnmflip.html +--- old/userguide/pnmflip.html 2017-09-05 13:58:08.336559557 +0200 ++++ new/userguide/pnmflip.html 2017-09-05 14:07:15.065963977 +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 -urNp old/userguide/pnmmercator.html new/userguide/pnmmercator.html +--- old/userguide/pnmmercator.html 2017-09-05 13:58:08.334559565 +0200 ++++ new/userguide/pnmmercator.html 2017-09-05 14:08:08.305214742 +0200 +@@ -1,7 +1,6 @@ +- ++ + + +- + PnmMercator User Manual + + +diff -urNp old/userguide/ppmtogif.html new/userguide/ppmtogif.html +--- old/userguide/ppmtogif.html 2017-09-05 13:58:08.337559553 +0200 ++++ new/userguide/ppmtogif.html 2017-09-05 14:09:51.450583126 +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 --git a/SOURCES/netpbm-manual-pages.patch b/SOURCES/netpbm-manual-pages.patch new file mode 100644 index 0000000..b5fbbea --- /dev/null +++ b/SOURCES/netpbm-manual-pages.patch @@ -0,0 +1,1343 @@ +diff -urNp old/userguide/libnetpbm_ug.html new/userguide/libnetpbm_ug.html +--- old/userguide/libnetpbm_ug.html 2017-09-05 14:20:09.734743404 +0200 ++++ new/userguide/libnetpbm_ug.html 2017-09-05 14:47:30.496705483 +0200 +@@ -374,7 +374,7 @@ plain format. +

    Reference

    + +

    The Libnetpbm Netpbm Image +-Processing Manual describes the the libnetpbm functions for ++Processing Manual describes the libnetpbm functions for + processing image data. + +

    The Libnetpbm Utility Manual +diff -urNp old/userguide/pamfunc.html new/userguide/pamfunc.html +--- old/userguide/pamfunc.html 2017-09-05 14:20:09.738743398 +0200 ++++ new/userguide/pamfunc.html 2017-09-05 14:47:41.760644848 +0200 +@@ -57,7 +57,7 @@ output image. + and bit string (such as and with 01001000). For the arithmetic functions, the + function arguments and results are the fraction that a sample is of the + maxval, i.e. normal interpretation of PAM tuples. But for the bit string +-functions, the value is the the bit string whose value as a binary cipher is ++functions, the value is the bit string whose value as a binary cipher is + the sample value, and the maxval indicates the width of the bit string. + +

    Arithmetic functions

    +diff -urNp old/userguide/pbmtextps.html new/userguide/pbmtextps.html +--- old/userguide/pbmtextps.html 2017-09-05 14:20:09.736743401 +0200 ++++ new/userguide/pbmtextps.html 2017-09-05 14:47:58.840553598 +0200 +@@ -185,7 +185,7 @@ edge of the type. See Margins for details. + +

    Sizes are in points, as a floating point number. +diff -urNp old/userguide/pbmtog3.html new/userguide/pbmtog3.html +--- old/userguide/pbmtog3.html 2017-09-05 14:20:09.735743403 +0200 ++++ new/userguide/pbmtog3.html 2017-09-05 14:48:55.648255793 +0200 +@@ -77,7 +77,7 @@ You cannot specify both. +

    HISTORY

    + +

    Before Netpbm 10.79 (June 2017), there was a different program by the same +-name in Netpbm, which was written by by Paul Haeberli ++name in Netpbm, which was written by Paul Haeberli + <paul@manray.sgi.com> in 1989 + and then modified extensively by others. + +diff -urNp old/userguide/ppmtompeg.html new/userguide/ppmtompeg.html +--- old/userguide/ppmtompeg.html 2017-09-05 14:20:09.739743396 +0200 ++++ new/userguide/ppmtompeg.html 1970-01-01 01:00:00.000000000 +0100 +@@ -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 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-noppmtompeg.patch b/SOURCES/netpbm-noppmtompeg.patch new file mode 100644 index 0000000..2b2f2db --- /dev/null +++ b/SOURCES/netpbm-noppmtompeg.patch @@ -0,0 +1,12 @@ +diff -urNp old/converter/ppm/Makefile new/converter/ppm/Makefile +--- old/converter/ppm/Makefile 2017-09-05 13:40:36.789469114 +0200 ++++ new/converter/ppm/Makefile 2017-09-05 13:42:55.974616951 +0200 +@@ -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-ppmfadeusage.patch b/SOURCES/netpbm-ppmfadeusage.patch new file mode 100644 index 0000000..d48f5f5 --- /dev/null +++ b/SOURCES/netpbm-ppmfadeusage.patch @@ -0,0 +1,57 @@ +diff -urNp old/editor/ppmfade new/editor/ppmfade +--- old/editor/ppmfade 2017-11-01 11:47:49.869611402 +0100 ++++ new/editor/ppmfade 2017-11-01 11:53:25.524973342 +0100 +@@ -84,7 +84,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++; +@@ -92,7 +92,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++; +@@ -113,9 +113,12 @@ for ($n = 0; $n < @ARGV; $n++) { + $mode = $BLOCK; + } elsif ("$ARGV[$n]" eq "-mix") { + $mode = $MIX; ++ } 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; + } + } + # +@@ -134,18 +137,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-security-code.patch b/SOURCES/netpbm-security-code.patch new file mode 100644 index 0000000..9d286c8 --- /dev/null +++ b/SOURCES/netpbm-security-code.patch @@ -0,0 +1,1554 @@ +diff -urNp old/analyzer/pgmtexture.c new/analyzer/pgmtexture.c +--- old/analyzer/pgmtexture.c 2017-09-05 15:09:00.975207528 +0200 ++++ new/analyzer/pgmtexture.c 2017-09-05 15:11:44.193390835 +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."); +@@ -137,6 +138,7 @@ matrix (unsigned int const nrl, + + 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 -urNp old/converter/other/gemtopnm.c new/converter/other/gemtopnm.c +--- old/converter/other/gemtopnm.c 2017-09-05 15:09:00.990207453 +0200 ++++ new/converter/other/gemtopnm.c 2017-09-05 15:12:20.786208419 +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 -urNp old/converter/other/jpegtopnm.c new/converter/other/jpegtopnm.c +--- old/converter/other/jpegtopnm.c 2017-09-05 15:09:00.993207438 +0200 ++++ new/converter/other/jpegtopnm.c 2017-09-05 15:13:02.322001620 +0200 +@@ -862,6 +862,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 -urNp old/converter/other/pbmtopgm.c new/converter/other/pbmtopgm.c +--- old/converter/other/pbmtopgm.c 2017-09-05 15:09:00.991207448 +0200 ++++ new/converter/other/pbmtopgm.c 2017-09-05 15:13:32.640850830 +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 -urNp old/converter/other/pnmtoddif.c new/converter/other/pnmtoddif.c +--- old/converter/other/pnmtoddif.c 2017-09-05 15:09:00.991207448 +0200 ++++ new/converter/other/pnmtoddif.c 2017-09-05 15:14:34.400564239 +0200 +@@ -629,6 +629,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; +@@ -644,6 +645,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 -urNp old/converter/other/pnmtojpeg.c new/converter/other/pnmtojpeg.c +--- old/converter/other/pnmtojpeg.c 2017-09-05 15:09:00.992207443 +0200 ++++ new/converter/other/pnmtojpeg.c 2017-09-05 15:16:52.065875364 +0200 +@@ -606,7 +606,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); +@@ -938,6 +942,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) * +@@ -1016,6 +1022,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 -urNp old/converter/other/pnmtops.c new/converter/other/pnmtops.c +--- old/converter/other/pnmtops.c 2017-09-05 15:09:00.993207438 +0200 ++++ new/converter/other/pnmtops.c 2017-09-05 15:18:52.602038826 +0200 +@@ -293,18 +293,22 @@ 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 -urNp old/converter/other/pnmtorle.c new/converter/other/pnmtorle.c +--- old/converter/other/pnmtorle.c 2017-09-05 15:09:00.993207438 +0200 ++++ new/converter/other/pnmtorle.c 2017-09-05 15:19:42.218061079 +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 -urNp old/converter/other/pnmtosgi.c new/converter/other/pnmtosgi.c +--- old/converter/other/pnmtosgi.c 2017-09-05 15:09:00.992207443 +0200 ++++ new/converter/other/pnmtosgi.c 2017-09-05 15:23:54.121864563 +0200 +@@ -139,6 +139,8 @@ compress(ScanElem * const tempArg, + break; + case STORAGE_RLE: { + unsigned int const tabrow = chanNum * rows + row; ++ overflow2(chanNum, rows); ++ overflow_add(chanNum * rows, row); + + unsigned int len; + size_t lenBytes; +@@ -185,6 +187,7 @@ buildChannels(FILE * const ifP, + ScanElem * temp; + + if (storage != STORAGE_VERBATIM) { ++ overflow2(channels, rows); + MALLOCARRAY_NOFAIL(table, channels * rows); + } else + table = NULL; +diff -urNp old/converter/other/rletopnm.c new/converter/other/rletopnm.c +--- old/converter/other/rletopnm.c 2017-09-05 15:09:00.991207448 +0200 ++++ new/converter/other/rletopnm.c 2017-09-05 15:24:29.441803825 +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 -urNp old/converter/other/sgitopnm.c new/converter/other/sgitopnm.c +--- old/converter/other/sgitopnm.c 2017-09-05 15:09:00.991207448 +0200 ++++ new/converter/other/sgitopnm.c 2017-09-05 15:26:59.320478129 +0200 +@@ -377,10 +377,14 @@ readChannels(FILE * const ifP, + MALLOCARRAY_NOFAIL(image, head->ysize); + } else { + maxchannel = 3; ++ overflow2(head->ysize, maxchannel); + MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel); + } +- if (table) ++ if (table) { ++ overflow2(head->xsize, 2); ++ overflow_add(head->xsize*2, 2); + MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize)); ++ } + + for (channel = 0; channel < maxchannel; ++channel) { + unsigned int row; +diff -urNp old/converter/other/sirtopnm.c new/converter/other/sirtopnm.c +--- old/converter/other/sirtopnm.c 2017-09-05 15:09:00.993207438 +0200 ++++ new/converter/other/sirtopnm.c 2017-09-05 15:27:29.784400243 +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 -urNp old/converter/other/tifftopnm.c new/converter/other/tifftopnm.c +--- old/converter/other/tifftopnm.c 2017-09-05 15:09:00.991207448 +0200 ++++ new/converter/other/tifftopnm.c 2017-09-05 15:29:34.649047220 +0200 +@@ -1372,7 +1372,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 -urNp old/converter/other/xwdtopnm.c new/converter/other/xwdtopnm.c +--- old/converter/other/xwdtopnm.c 2017-09-05 15:09:00.994207433 +0200 ++++ new/converter/other/xwdtopnm.c 2017-09-05 15:30:51.608806353 +0200 +@@ -210,6 +210,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; +@@ -635,6 +639,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 -urNp old/converter/pbm/mdatopbm.c new/converter/pbm/mdatopbm.c +--- old/converter/pbm/mdatopbm.c 2017-09-05 15:09:00.988207463 +0200 ++++ new/converter/pbm/mdatopbm.c 2017-09-05 15:31:47.007612804 +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 -urNp old/converter/pbm/mgrtopbm.c new/converter/pbm/mgrtopbm.c +--- old/converter/pbm/mgrtopbm.c 2017-09-05 15:09:00.988207463 +0200 ++++ new/converter/pbm/mgrtopbm.c 2017-09-05 15:32:29.335457328 +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 -urNp old/converter/pbm/pbmtogem.c new/converter/pbm/pbmtogem.c +--- old/converter/pbm/pbmtogem.c 2017-09-05 15:09:00.988207463 +0200 ++++ new/converter/pbm/pbmtogem.c 2017-09-05 15:33:20.015266347 +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 -urNp old/converter/pbm/pbmtogo.c new/converter/pbm/pbmtogo.c +--- old/converter/pbm/pbmtogo.c 2017-09-05 15:09:00.988207463 +0200 ++++ new/converter/pbm/pbmtogo.c 2017-09-05 15:33:44.200173491 +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 -urNp old/converter/pbm/pbmtolj.c new/converter/pbm/pbmtolj.c +--- old/converter/pbm/pbmtolj.c 2017-09-05 15:09:00.987207468 +0200 ++++ new/converter/pbm/pbmtolj.c 2017-09-05 15:34:35.767972087 +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 -urNp old/converter/pbm/pbmtomda.c new/converter/pbm/pbmtomda.c +--- old/converter/pbm/pbmtomda.c 2017-09-05 15:09:00.987207468 +0200 ++++ new/converter/pbm/pbmtomda.c 2017-09-05 15:47:39.279563827 +0200 +@@ -179,6 +179,8 @@ 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 -urNp old/converter/pbm/pbmtoppa/pbm.c new/converter/pbm/pbmtoppa/pbm.c +--- old/converter/pbm/pbmtoppa/pbm.c 2017-09-05 15:09:00.990207453 +0200 ++++ new/converter/pbm/pbmtoppa/pbm.c 2017-09-05 15:49:13.364155211 +0200 +@@ -106,6 +106,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) +@@ -130,7 +131,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 -urNp old/converter/pbm/pbmtoppa/pbmtoppa.c new/converter/pbm/pbmtoppa/pbmtoppa.c +--- old/converter/pbm/pbmtoppa/pbmtoppa.c 2017-09-05 15:09:00.990207453 +0200 ++++ new/converter/pbm/pbmtoppa/pbmtoppa.c 2017-09-05 15:50:10.811968059 +0200 +@@ -453,6 +453,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 -urNp old/converter/pbm/pbmtoxbm.c new/converter/pbm/pbmtoxbm.c +--- old/converter/pbm/pbmtoxbm.c 2017-09-05 15:09:00.987207468 +0200 ++++ new/converter/pbm/pbmtoxbm.c 2017-09-05 15:51:01.843793892 +0200 +@@ -353,6 +353,8 @@ convertRaster(FILE * const ifP, + unsigned char * bitrow; + unsigned int row; + ++ overflow_add(cols, padright); ++ + putinit(xbmVersion); + + bitrow = pbm_allocrow_packed(cols + padright); +diff -urNp old/converter/pbm/pbmto4425.c new/converter/pbm/pbmto4425.c +--- old/converter/pbm/pbmto4425.c 2017-09-05 15:09:00.988207463 +0200 ++++ new/converter/pbm/pbmto4425.c 2017-09-05 15:54:37.077992604 +0200 +@@ -160,7 +160,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 -urNp old/converter/pbm/pktopbm.c new/converter/pbm/pktopbm.c +--- old/converter/pbm/pktopbm.c 2017-09-05 15:09:00.988207463 +0200 ++++ new/converter/pbm/pktopbm.c 2017-09-05 15:55:35.736759083 +0200 +@@ -280,6 +280,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 -urNp old/converter/pbm/thinkjettopbm.l new/converter/pbm/thinkjettopbm.l +--- old/converter/pbm/thinkjettopbm.l 2017-09-05 15:09:00.988207463 +0200 ++++ new/converter/pbm/thinkjettopbm.l 2017-09-05 15:57:03.449400388 +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,7 @@ 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 -urNp old/converter/pgm/lispmtopgm.c new/converter/pgm/lispmtopgm.c +--- old/converter/pgm/lispmtopgm.c 2017-09-05 15:09:01.002207393 +0200 ++++ new/converter/pgm/lispmtopgm.c 2017-09-05 15:59:07.145878261 +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 -urNp old/converter/pgm/psidtopgm.c new/converter/pgm/psidtopgm.c +--- old/converter/pgm/psidtopgm.c 2017-09-05 15:09:01.002207393 +0200 ++++ new/converter/pgm/psidtopgm.c 2017-09-05 15:59:42.457726237 +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 -urNp old/converter/ppm/ilbmtoppm.c new/converter/ppm/ilbmtoppm.c +--- old/converter/ppm/ilbmtoppm.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/ilbmtoppm.c 2017-09-05 16:04:33.011437671 +0200 +@@ -606,6 +606,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; +@@ -693,6 +694,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) +@@ -1355,6 +1373,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); +@@ -1784,7 +1805,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; +@@ -2049,6 +2072,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++ ) +@@ -2125,6 +2151,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 -urNp old/converter/ppm/imgtoppm.c new/converter/ppm/imgtoppm.c +--- old/converter/ppm/imgtoppm.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/imgtoppm.c 2017-09-06 09:21:05.977198159 +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 -urNp old/converter/ppm/Makefile new/converter/ppm/Makefile +--- old/converter/ppm/Makefile 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/Makefile 2017-09-06 09:21:56.848867561 +0200 +@@ -11,7 +11,7 @@ SUBDIRS = hpcdtoppm + + 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 -urNp old/converter/ppm/pcxtoppm.c new/converter/ppm/pcxtoppm.c +--- old/converter/ppm/pcxtoppm.c 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/pcxtoppm.c 2017-09-06 09:33:20.821565782 +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 -urNp old/converter/ppm/picttoppm.c new/converter/ppm/picttoppm.c +--- old/converter/ppm/picttoppm.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/picttoppm.c 2017-09-06 09:35:38.693912426 +0200 +@@ -1,4 +1,6 @@ +-/* ++/* !!!WARNING!!! -> error "Unfixable. Don't ship me" ++ * ++ * + * picttoppm.c -- convert a MacIntosh PICT file to PPM format. + * + * Copyright 1989,1992,1993 George Phillips +diff -urNp old/converter/ppm/pjtoppm.c new/converter/ppm/pjtoppm.c +--- old/converter/ppm/pjtoppm.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/pjtoppm.c 2017-09-06 09:39:54.747634431 +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 -urNp old/converter/ppm/ppmtoeyuv.c new/converter/ppm/ppmtoeyuv.c +--- old/converter/ppm/ppmtoeyuv.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/ppmtoeyuv.c 2017-09-06 09:40:38.859425818 +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 -urNp old/converter/ppm/ppmtoilbm.c new/converter/ppm/ppmtoilbm.c +--- old/converter/ppm/ppmtoilbm.c 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/ppmtoilbm.c 2017-09-06 09:48:06.002139282 +0200 +@@ -190,6 +190,7 @@ makeValTable(int const oldmaxval, + unsigned int i; + int * table; + ++ overflow_add(oldmaxval, 1); + MALLOCARRAY_NOFAIL(table, oldmaxval + 1); + for (i = 0; i <= oldmaxval; ++i) + table[i] = ROUNDDIV(i * newmaxval, oldmaxval); +@@ -1644,6 +1645,7 @@ ppmToRgb8(FILE * const ifP, + + maskmethod = 0; /* no masking - RGB8 uses genlock bits */ + compmethod = 4; /* RGB8 files are always compressed */ ++ overflow2(cols, 4); + MALLOCARRAY_NOFAIL(compr_row, cols * 4); + + if( maxval != 255 ) { +@@ -1735,6 +1737,7 @@ ppmToRgbn(FILE * const ifP, + + maskmethod = 0; /* no masking - RGBN uses genlock bits */ + compmethod = 4; /* RGBN files are always compressed */ ++ overflow2(cols, 2); + MALLOCARRAY_NOFAIL(compr_row, cols * 2); + + if( maxval != 15 ) { +@@ -2298,8 +2301,11 @@ main(int argc, char ** argv) { + MALLOCARRAY_NOFAIL(coded_rowbuf, RowBytes(cols)); + for (i = 0; i < RowBytes(cols); ++i) + coded_rowbuf[i] = 0; +- if (DO_COMPRESS) ++ if (DO_COMPRESS) { ++ overflow2(cols,2); ++ overflow_add(cols*2,2); + pm_rlenc_allocoutbuf(&compr_rowbuf, RowBytes(cols), PM_RLE_PACKBITS); ++ } + } + + switch (mode) { +diff -urNp old/converter/ppm/ppmtolj.c new/converter/ppm/ppmtolj.c +--- old/converter/ppm/ppmtolj.c 2017-09-05 15:09:01.002207393 +0200 ++++ new/converter/ppm/ppmtolj.c 2017-09-06 09:48:48.400910976 +0200 +@@ -182,6 +182,7 @@ int main(int argc, char *argv[]) { + ppm_readppminit( ifp, &cols, &rows, &maxval, &format ); + pixelrow = ppm_allocrow( cols ); + ++ overflow2(cols, 6); + obuf = (unsigned char *) pm_allocrow(cols * 3, sizeof(unsigned char)); + cbuf = (unsigned char *) pm_allocrow(cols * 6, sizeof(unsigned char)); + if (mode == C_TRANS_MODE_DELTA) +diff -urNp old/converter/ppm/ppmtomitsu.c new/converter/ppm/ppmtomitsu.c +--- old/converter/ppm/ppmtomitsu.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/ppmtomitsu.c 2017-09-06 09:49:28.752692414 +0200 +@@ -685,6 +685,8 @@ main(int argc, char * argv[]) { + medias = MSize_User; + + if (dpi300) { ++ overflow2(medias.maxcols, 2); ++ overflow2(medias.maxrows, 2); + medias.maxcols *= 2; + medias.maxrows *= 2; + } +diff -urNp old/converter/ppm/ppmtopcx.c new/converter/ppm/ppmtopcx.c +--- old/converter/ppm/ppmtopcx.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/ppmtopcx.c 2017-09-06 09:50:31.104352461 +0200 +@@ -425,6 +425,8 @@ ppmTo16ColorPcx(pixel ** cons + else Planes = 1; + } + } ++ overflow2(BitsPerPixel, cols); ++ overflow_add(BitsPerPixel * cols, 7); + BytesPerLine = ((cols * BitsPerPixel) + 7) / 8; + MALLOCARRAY_NOFAIL(indexRow, cols); + MALLOCARRAY_NOFAIL(planesrow, BytesPerLine); +diff -urNp old/converter/ppm/ppmtopict.c new/converter/ppm/ppmtopict.c +--- old/converter/ppm/ppmtopict.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/ppmtopict.c 2017-09-06 09:52:06.303828816 +0200 +@@ -450,6 +450,8 @@ main(int argc, const char ** argv) { + putShort(stdout, 0); /* mode */ + + /* Finally, write out the data. */ ++ overflow_add(cols/MAX_COUNT, 1); ++ overflow_add(cols, cols/MAX_COUNT+1); + outBuf = malloc((unsigned)(cols+cols/MAX_COUNT+1)); + for (row = 0, oc = 0; row < rows; ++row) { + unsigned int rowSize; +diff -urNp old/converter/ppm/ppmtopj.c new/converter/ppm/ppmtopj.c +--- old/converter/ppm/ppmtopj.c 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/ppmtopj.c 2017-09-06 09:52:34.623672093 +0200 +@@ -179,6 +179,7 @@ char *argv[]; + pixels = ppm_readppm( ifp, &cols, &rows, &maxval ); + + pm_close( ifp ); ++ overflow2(cols,2); + obuf = (unsigned char *) pm_allocrow(cols, sizeof(unsigned char)); + cbuf = (unsigned char *) pm_allocrow(cols * 2, sizeof(unsigned char)); + +diff -urNp old/converter/ppm/ppmtopjxl.c new/converter/ppm/ppmtopjxl.c +--- old/converter/ppm/ppmtopjxl.c 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/ppmtopjxl.c 2017-09-06 09:55:28.614593979 +0200 +@@ -266,6 +266,8 @@ main(int argc, const char * argv[]) { + pm_error("image too large; reduce with ppmscale"); + if (maxval > PCL_MAXVAL) + pm_error("color range too large; reduce with ppmcscale"); ++ if (cols < 0 || rows < 0) ++ pm_error("negative size is not possible"); + + /* Figure out the colormap. */ + pm_message("Computing colormap..."); +@@ -286,6 +288,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 */ +@@ -295,9 +299,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 -urNp old/converter/ppm/ppmtowinicon.c new/converter/ppm/ppmtowinicon.c +--- old/converter/ppm/ppmtowinicon.c 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/ppmtowinicon.c 2017-09-06 10:33:10.865812492 +0200 +@@ -12,6 +12,7 @@ + + #include + #include ++#include + + #include "pm_c_util.h" + #include "winico.h" +@@ -214,6 +215,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 -urNp old/converter/ppm/ppmtoxpm.c new/converter/ppm/ppmtoxpm.c +--- old/converter/ppm/ppmtoxpm.c 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/ppmtoxpm.c 2017-09-06 10:34:25.169426581 +0200 +@@ -198,6 +198,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"); + +@@ -315,6 +316,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 -urNp old/converter/ppm/qrttoppm.c new/converter/ppm/qrttoppm.c +--- old/converter/ppm/qrttoppm.c 2017-09-05 15:09:01.004207383 +0200 ++++ new/converter/ppm/qrttoppm.c 2017-09-06 10:35:08.784199292 +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 -urNp old/converter/ppm/sldtoppm.c new/converter/ppm/sldtoppm.c +--- old/converter/ppm/sldtoppm.c 2017-09-05 15:09:01.002207393 +0200 ++++ new/converter/ppm/sldtoppm.c 2017-09-06 10:36:09.873951211 +0200 +@@ -463,7 +463,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 -urNp old/converter/ppm/ximtoppm.c new/converter/ppm/ximtoppm.c +--- old/converter/ppm/ximtoppm.c 2017-09-05 15:09:01.003207388 +0200 ++++ new/converter/ppm/ximtoppm.c 2017-09-06 10:38:43.249091632 +0200 +@@ -118,6 +118,7 @@ ReadXimHeader(FILE * const in_fp, + header->bits_channel = atoi(a_head.bits_per_channel); + header->alpha_flag = atoi(a_head.alpha_channel); + if (strlen(a_head.author)) { ++ overflow_add(strlen(a_head.author),1); + if (!(header->author = calloc((unsigned int)strlen(a_head.author)+1, + 1))) { + pm_message("ReadXimHeader: can't calloc author string" ); +@@ -127,6 +128,7 @@ ReadXimHeader(FILE * const in_fp, + strncpy(header->author, a_head.author, strlen(a_head.author)); + } + if (strlen(a_head.date)) { ++ overflow_add(strlen(a_head.date),1); + if (!(header->date =calloc((unsigned int)strlen(a_head.date)+1,1))){ + pm_message("ReadXimHeader: can't calloc date string" ); + return(0); +@@ -135,6 +137,7 @@ ReadXimHeader(FILE * const in_fp, + strncpy(header->date, a_head.date, strlen(a_head.date)); + } + if (strlen(a_head.program)) { ++ overflow_add(strlen(a_head.program),1); + if (!(header->program = calloc( + (unsigned int)strlen(a_head.program) + 1, 1))) { + pm_message("ReadXimHeader: can't calloc program string" ); +@@ -161,6 +164,7 @@ ReadXimHeader(FILE * const in_fp, + 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 -urNp old/editor/pamcut.c new/editor/pamcut.c +--- old/editor/pamcut.c 2017-09-05 15:09:00.983207488 +0200 ++++ new/editor/pamcut.c 2017-09-06 10:42:53.441815922 +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 -urNp old/editor/pnmgamma.c new/editor/pnmgamma.c +--- old/editor/pnmgamma.c 2017-09-05 15:09:00.985207478 +0200 ++++ new/editor/pnmgamma.c 2017-09-06 10:45:16.328461856 +0200 +@@ -596,6 +596,7 @@ createGammaTables(enum transferFunction + xelval ** const btableP) { + + /* Allocate space for the tables. */ ++ overflow_add(maxval, 1); + MALLOCARRAY(*rtableP, maxval+1); + MALLOCARRAY(*gtableP, maxval+1); + MALLOCARRAY(*btableP, maxval+1); +diff -urNp old/editor/pnmhisteq.c new/editor/pnmhisteq.c +--- old/editor/pnmhisteq.c 2017-09-05 15:09:00.983207488 +0200 ++++ new/editor/pnmhisteq.c 2017-09-06 10:46:30.959235397 +0200 +@@ -107,6 +107,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 -urNp old/editor/pnmindex.csh new/editor/pnmindex.csh +--- old/editor/pnmindex.csh 2017-09-05 15:09:00.986207473 +0200 ++++ new/editor/pnmindex.csh 2017-09-06 10:47:46.007983350 +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 -urNp old/editor/pnmpad.c new/editor/pnmpad.c +--- old/editor/pnmpad.c 2017-09-05 15:09:00.983207488 +0200 ++++ new/editor/pnmpad.c 2017-09-06 10:48:42.415778475 +0200 +@@ -634,6 +634,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 -urNp old/editor/pnmremap.c new/editor/pnmremap.c +--- old/editor/pnmremap.c 2017-09-05 15:09:00.984207483 +0200 ++++ new/editor/pnmremap.c 2017-09-06 10:49:56.879492310 +0200 +@@ -430,6 +430,7 @@ initFserr(struct pam * const pamP, + + unsigned int const fserrSize = pamP->width + 2; + ++ overflow_add(pamP->width, 2); + fserrP->width = pamP->width; + + MALLOCARRAY(fserrP->thiserr, pamP->depth); +@@ -467,6 +468,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 -urNp old/editor/pnmscalefixed.c new/editor/pnmscalefixed.c +--- old/editor/pnmscalefixed.c 2017-09-05 15:09:00.986207473 +0200 ++++ new/editor/pnmscalefixed.c 2017-09-06 10:52:07.110955503 +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 -urNp old/editor/pnmshear.c new/editor/pnmshear.c +--- old/editor/pnmshear.c 2017-09-05 15:09:00.985207478 +0200 ++++ new/editor/pnmshear.c 2017-09-06 11:57:18.485705533 +0200 +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include "pm_c_util.h" + #include "mallocvar.h" +@@ -242,6 +243,11 @@ main(int argc, const 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 -urNp old/editor/ppmdither.c new/editor/ppmdither.c +--- old/editor/ppmdither.c 2017-09-05 15:09:00.984207483 +0200 ++++ new/editor/ppmdither.c 2017-09-06 11:57:58.507533974 +0200 +@@ -355,6 +355,10 @@ 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); + +diff -urNp old/editor/specialty/pamoil.c new/editor/specialty/pamoil.c +--- old/editor/specialty/pamoil.c 2017-09-05 15:09:00.986207473 +0200 ++++ new/editor/specialty/pamoil.c 2017-09-06 11:58:39.091357659 +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 -urNp old/generator/pbmtext.c new/generator/pbmtext.c +--- old/generator/pbmtext.c 2017-09-05 15:09:00.957207619 +0200 ++++ new/generator/pbmtext.c 2017-09-06 12:02:22.348352850 +0200 +@@ -125,6 +125,7 @@ parseCommandLine(int argc, const char ** + if (i > 1) { + strcat(text, " "); + } ++ overflow_add(totaltextsize, strlen(argv[i]) + 1); + totaltextsize += strlen(argv[i]) + 1; + if (totaltextsize > MAXLINECHARS) + pm_error("input text too long"); +@@ -745,6 +746,7 @@ getText(char const cmdlineText[ + pm_error("A line of input text is longer than %u characters." + "Cannot process", (unsigned int) MAXLINECHARS-1); + if (lineCount >= maxlines) { ++ overflow2(maxlines, 2); + maxlines *= 2; + REALLOCARRAY(textArray, maxlines); + if (textArray == NULL) +@@ -781,6 +783,7 @@ computeMargins(struct CmdlineInfo const + *hmarginP = fontP->maxwidth; + } else { + *vmarginP = fontP->maxheight; ++ overflow2(2, fontP->maxwidth); + *hmarginP = 2 * fontP->maxwidth; + } + } +diff -urNp old/lib/libpam.c new/lib/libpam.c +--- old/lib/libpam.c 2017-09-05 15:09:00.978207513 +0200 ++++ new/lib/libpam.c 2017-09-06 12:06:07.132297384 +0200 +@@ -225,7 +225,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 -urNp old/lib/libpammap.c new/lib/libpammap.c +--- old/lib/libpammap.c 2017-09-05 15:09:00.977207518 +0200 ++++ new/lib/libpammap.c 2017-09-06 12:06:50.764088850 +0200 +@@ -108,6 +108,8 @@ allocTupleIntListItem(struct pam * const + */ + struct tupleint_list_item * retval; + ++ overflow2(pamP->depth, sizeof(sample)); ++ overflow_add(sizeof(*retval)-sizeof(retval->tupleint.tuple), pamP->depth*sizeof(sample)); + unsigned int const size = + sizeof(*retval) - sizeof(retval->tupleint.tuple) + + pamP->depth * sizeof(sample); +diff -urNp old/lib/libpbm1.c new/lib/libpbm1.c +--- old/lib/libpbm1.c 2017-09-05 15:09:00.978207513 +0200 ++++ new/lib/libpbm1.c 2017-09-06 12:11:41.063680260 +0200 +@@ -77,6 +77,7 @@ pbm_check(FILE * const fil + if (retvalP) + *retvalP = PM_CHECK_UNCHECKABLE; + } else { ++ overflow_add(cols, 7); + pm_filepos const bytesPerRow = (cols+7)/8; + pm_filepos const needRasterSize = rows * bytesPerRow; + pm_check(fileP, checkType, needRasterSize, retvalP); +diff -urNp old/lib/libpm.c new/lib/libpm.c +--- old/lib/libpm.c 2017-09-05 15:09:00.977207518 +0200 ++++ new/lib/libpm.c 2017-09-06 12:13:26.144162930 +0200 +@@ -889,4 +889,52 @@ 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 -urNp old/lib/pm.h new/lib/pm.h +--- old/lib/pm.h 2017-09-05 15:09:00.979207508 +0200 ++++ new/lib/pm.h 2017-09-06 12:14:44.159772344 +0200 +@@ -435,5 +435,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 -urNp old/other/pnmcolormap.c new/other/pnmcolormap.c +--- old/other/pnmcolormap.c 2017-09-05 15:09:00.982207493 +0200 ++++ new/other/pnmcolormap.c 2017-09-06 12:16:38.998195226 +0200 +@@ -836,10 +836,12 @@ colormapToSquare(struct pam * const pamP + tuple *** const outputRasterP) { + { + unsigned int const intsqrt = (int)sqrt((float)colormap.size); +- if (intsqrt * intsqrt == colormap.size) ++ if (intsqrt * intsqrt == colormap.size) + pamP->width = intsqrt; +- else +- pamP->width = intsqrt + 1; ++ else { ++ overflow_add(intsqrt, 1); ++ pamP->width = intsqrt + 1; ++ } + } + { + unsigned int const intQuotient = colormap.size / pamP->width; +diff -urNp old/urt/README new/urt/README +--- old/urt/README 2017-09-05 15:09:00.975207528 +0200 ++++ new/urt/README 2017-09-06 12:18:11.582728375 +0200 +@@ -18,3 +18,12 @@ 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 ++ ++Update Alan's changes for version 10.79.00. ++ ++Josef Ridky +diff -urNp old/urt/rle_addhist.c new/urt/rle_addhist.c +--- old/urt/rle_addhist.c 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/rle_addhist.c 2017-09-06 12:20:37.615007358 +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 +@@ -70,13 +72,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... */ +@@ -84,9 +92,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 -urNp old/urt/rle_getrow.c new/urt/rle_getrow.c +--- old/urt/rle_getrow.c 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/rle_getrow.c 2017-09-06 12:21:51.591095294 +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. +@@ -160,6 +162,7 @@ rle_get_setup(rle_hdr * const the_hdr) { + char * cp; + + VAXSHORT(comlen, infile); /* get comment length */ ++ overflow_add(comlen, 1); + evenlen = (comlen + 1) & ~1; /* make it even */ + if (evenlen) { + MALLOCARRAY(comment_buf, evenlen); +diff -urNp old/urt/rle.h new/urt/rle.h +--- old/urt/rle.h 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/rle.h 2017-09-06 12:28:40.502652837 +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. +@@ -161,6 +164,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 -urNp old/urt/rle_hdr.c new/urt/rle_hdr.c +--- old/urt/rle_hdr.c 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/rle_hdr.c 2017-09-06 12:27:23.846827208 +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 = (char *)malloc( strlen( pgmname ) + 1 ); + RLE_CHECK_ALLOC( pgmname, tmp, 0 ); + strcpy( tmp, pgmname ); + the_hdr->cmd = tmp; +@@ -88,7 +93,10 @@ int img_num; + + if ( the_hdr->file_name != fname ) + { +- char *tmp = (char *)malloc( strlen( fname ) + 1 ); ++ char *tmp; ++ ++ overflow_add(strlen(fname), 1); ++ tmp = (char *)malloc( strlen( fname ) + 1 ); + RLE_CHECK_ALLOC( pgmname, tmp, 0 ); + strcpy( tmp, fname ); + the_hdr->file_name = tmp; +@@ -152,6 +160,7 @@ rle_hdr *from_hdr, *to_hdr; + + if ( to_hdr->bg_color ) + { ++ overflow2(to_hdr->ncolors, sizeof(int)); + int size = to_hdr->ncolors * sizeof(int); + to_hdr->bg_color = (int *)malloc( size ); + RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->bg_color, "background color" ); +@@ -161,7 +170,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 +183,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 -urNp old/urt/rle_open_f.c new/urt/rle_open_f.c +--- old/urt/rle_open_f.c 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/rle_open_f.c 2017-09-06 12:30:07.309418990 +0200 +@@ -164,64 +164,7 @@ dealWithSubprocess(const char * const f + 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 -urNp old/urt/rle_putcom.c new/urt/rle_putcom.c +--- old/urt/rle_putcom.c 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/rle_putcom.c 2017-09-06 12:31:29.550158232 +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 -urNp old/urt/Runput.c new/urt/Runput.c +--- old/urt/Runput.c 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/Runput.c 2017-09-06 12:33:47.933658290 +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 -urNp old/urt/scanargs.c new/urt/scanargs.c +--- old/urt/scanargs.c 2017-09-05 15:09:00.976207523 +0200 ++++ new/urt/scanargs.c 2017-09-06 12:35:21.372289086 +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 +@@ -62,8 +64,8 @@ typedef int *ptr; + /* + * Storage allocation macros + */ +-#define NEW( type, cnt ) (type *) malloc( (cnt) * sizeof( type ) ) +-#define RENEW( type, ptr, cnt ) (type *) realloc( ptr, (cnt) * sizeof( type ) ) ++#define NEW( type, cnt ) (type *) malloc2( (cnt), sizeof( type ) ) ++#define RENEW( type, ptr, cnt ) (type *) realloc2( ptr, (cnt), sizeof( type ) ) + + static CONST_DECL char * prformat( CONST_DECL char *, int ); + static int isnum( CONST_DECL char *, int, int ); diff --git a/SOURCES/netpbm-security-scripts.patch b/SOURCES/netpbm-security-scripts.patch new file mode 100644 index 0000000..24675fb --- /dev/null +++ b/SOURCES/netpbm-security-scripts.patch @@ -0,0 +1,335 @@ +diff -urNp old/converter/other/anytopnm neew/converter/other/anytopnm +--- old/converter/other/anytopnm 2017-09-05 12:58:26.795741945 +0200 ++++ neew/converter/other/anytopnm 2017-09-05 13:03:12.985472566 +0200 +@@ -537,9 +537,8 @@ else + + fi + +-tempdir=$(mktemp -d "${TMPDIR:-/tmp}/anytopnm.XXXXXXXX") || ++tempdir=$(mktemp -d -t anytopnm.XXXXXXXX) || + ( echo "Could not create temporary file. Exiting." 1>&2; exit 1; ) +-trap 'rm -rf $tempdir' 0 + + # Take out all spaces + # Find the filename extension for last-ditch efforts later +@@ -565,9 +564,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 -urNp old/editor/pamstretch-gen neew/editor/pamstretch-gen +--- old/editor/pamstretch-gen 2017-09-05 12:58:26.763741946 +0200 ++++ neew/editor/pamstretch-gen 2017-09-05 13:03:12.985472566 +0200 +@@ -34,12 +34,10 @@ if [ "$1" = "" ]; then + exit 1 + fi + +-tempdir=$(mktemp -d "${TMPDIR:-/tmp}/netpbm.XXXXXXXX") || ++tempfile=$(mktemp /tmp/pnmig.XXXXXXXX) || + ( echo "Could not create temporary file. Exiting." 1>&2; 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 -urNp old/editor/ppmfade neew/editor/ppmfade +--- old/editor/ppmfade 2017-09-05 12:58:26.767741946 +0200 ++++ neew/editor/ppmfade 2017-09-05 12:59:14.556731156 +0200 +@@ -40,6 +40,7 @@ exec perl -w -x -S -- "$0" "$@" + # + ############################################################################## + use strict; ++use File::Temp "tempdir"; + + sub doVersionHack($) { + my ($argvR) = @_; +@@ -149,20 +149,26 @@ if ($first_file ne "undefined") { + + print("Frames are " . $width . "W x " . $height . "H\n"); + ++# ++# We create a tmp-directory right here ++# ++my $tmpdir = tempdir("ppmfade.XXXXXX", CLEANUP => 1); ++ ++ + if ($first_file eq "undefined") { + print "Fading from black to "; +- system("ppmmake \\#000 $width $height >junk1$$.ppm"); ++ system("ppmmake \\#000 $width $height >$tmpdir/junk1$$.ppm"); + } else { + print "Fading from $first_file to "; +- system("cp", $first_file, "junk1$$.ppm"); ++ system("cp", $first_file, "$tmpdir/junk1$$.ppm"); + } + + if ($last_file eq "undefined") { + print "black.\n"; +- system("ppmmake \\#000 $width $height >junk2$$.ppm"); ++ system("ppmmake \\#000 $width $height >$tmpdir/junk2$$.ppm"); + } else { + print "$last_file\n"; +- system("cp", $last_file, "junk2$$.ppm"); ++ system("cp", $last_file, "$tmpdir/junk2$$.ppm"); + } + + # +@@ -170,14 +176,14 @@ if ($last_file eq "undefined") { + # + + # Here's what our temporary files are: +-# junk1$$.ppm: The original (fade-from) image +-# junk2$$.ppm: The target (fade-from) image +-# junk3$$.ppm: The frame of the fade for the current iteration of the +-# the for loop. +-# junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate +-# image to another, this is the first frame of that +-# sequence. +-# junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence ++# $tmpdir/junk1$$.ppm: The original (fade-from) image ++# $tmpdir/junk2$$.ppm: The target (fade-from) image ++# $tmpdir/junk3$$.ppm: The frame of the fade for the current iteration of the ++# the for loop. ++# $tmpdir/junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate ++# image to another, this is the first frame of that ++# sequence. ++# $tmpdir/junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence + + my $i; # Frame number + for ($i = 1; $i <= $nframes; $i++) { +@@ -185,147 +191,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 -urNp old/editor/ppmshadow neew/editor/ppmshadow +--- old/editor/ppmshadow 2017-09-05 12:58:26.768741946 +0200 ++++ neew/editor/ppmshadow 2017-09-05 13:02:51.480507649 +0200 +@@ -171,11 +171,12 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp"; + my $ourtmp; + + if ($keeptemp) { +- $ourtmp = "$tmpdir/ppmshadow$$"; +- mkdir($ourtmp, 0777) or +- die("Unable to create directory for temporary files '$ourtmp"); ++ $ourtmp = chomp($ourtmp = `mktemp -d -t PPMshadow.XXXXXX`); ++ if($? >> 8) { ++ die "Can't create directory for temporary files"; ++ } + } else { +- $ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", UNLINK=>1); ++ $ourtmp = File::Temp::tempdir("$tmpdir/PPMshadow.XXXXXX", UNLINK=>1); + } + + # Apply defaults for arguments not specified 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..82eafb8 --- /dev/null +++ b/SPECS/netpbm.spec @@ -0,0 +1,1229 @@ +Summary: A library for handling different graphics file formats +Name: netpbm +Version: 10.79.00 +Release: 7%{?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-gcc4.patch +Patch6: netpbm-bmptopnm.patch +Patch7: netpbm-CAN-2005-2471.patch +Patch8: netpbm-xwdfix.patch +Patch9: netpbm-multilib.patch +Patch10: netpbm-glibc.patch +Patch11: netpbm-docfix.patch +Patch12: netpbm-fiasco-overflow.patch +Patch13: netpbm-noppmtompeg.patch +Patch14: netpbm-cmuwtopbm.patch +Patch15: netpbm-pamtojpeg2k.patch +Patch16: netpbm-manfix.patch +Patch17: netpbm-manual-pages.patch +Patch18: netpbm-ppmfadeusage.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 .gcc4 +%patch6 -p1 -b .bmptopnm +%patch7 -p1 -b .CAN-2005-2471 +%patch8 -p1 -b .xwdfix +%patch9 -p1 -b .multilib +%patch10 -p1 -b .glibc +%patch11 -p1 +%patch12 -p1 -b .fiasco-overflow +%patch13 -p1 -b .noppmtompeg +%patch14 -p1 -b .cmuwtopbmfix +%patch15 -p1 -b .pamtojpeg2kfix +%patch16 -p1 -b .manfix +%patch17 -p1 -b .manual-pages +%patch18 -p1 -b .ppmfadeusage + +rm -rf converter/other/jpeg2000/libjasper/ +sed -i -e 's/SUBDIRS += libjasper//' 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 +* Thu Jan 11 2018 Josef Ridky - 10.79.00-7 +- Revert to version 10.79.00-4 due suggested changes didn't work + +* Thu Jan 11 2018 Josef Ridky - 10.79.00-6 +- Spec update for RPM-Diff error + +* Thu Jan 04 2018 Josef Ridky - 10.79.00-5 +- Fix RPM-Diff issue with relro on ppx64[le] arch (#1523946) + +* Thu Jan 04 2018 Josef Ridky - 10.79.00-4 +- Resolves: #1523176 - add manual page for ppmtopga +- Resolves: #1530606 - pbmtoepson command line option fix + +* Wed Nov 01 2017 Josef Ridky - 10.79.00-3 +- Resolves: #1507569 - ppmfade error reporting + +* Wed Nov 01 2017 Josef Ridky - 10.79.00-2 +- Resolves: #1507963 - fix ppmfade error with undefined subroutine + +* Tue Sep 05 2017 Josef Ridky - 10.79.00-1 +- Resolves: #1381122 - Rebase to the latest upstream version + +* Tue Feb 25 2014 Petr Hracek - 10.61.02-9 +- Resolves: #1052154 - Pgmtexture gets aborted + +* Fri Jan 24 2014 Daniel Mach - 10.61.02-8 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 10.61.02-7 +- Mass rebuild 2013-12-27 + +* Tue Dec 17 2013 Petr Hracek - 10.61.02-6 +- Resolves: 1031514 - netpbm hangs during pnmtops conversion + +* 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 +