[netpbm/f17] - update to 10.58.01 - fix ppmtopict buffer underflow - fix memory corruption in pnmtopclxl

Jindrich Novy jnovy at fedoraproject.org
Thu Jun 14 09:43:11 UTC 2012


commit 63fa580c5be391c07302e248155ad60d60c19536
Author: Jindrich Novy <jnovy at redhat.com>
Date:   Thu Jun 14 11:46:01 2012 +0200

    - update to 10.58.01
    - fix ppmtopict buffer underflow
    - fix memory corruption in pnmtopclxl

 .gitignore                    |    2 +-
 netpbm-gcc4.patch             |   18 +-
 netpbm-manfix.patch           |   80 +++---
 netpbm-pnmtopclxl.patch       |   16 ++
 netpbm-ppmtopict.patch        |   12 +
 netpbm-security-code.patch    |  547 ++++++++++++++++++++---------------------
 netpbm-security-scripts.patch |   18 --
 netpbm.spec                   |   11 +-
 sources                       |    2 +-
 9 files changed, 362 insertions(+), 344 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 63598d1..8eea40c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/netpbm-10.57.01.tar.xz
+/netpbm-10.58.01.tar.xz
diff --git a/netpbm-gcc4.patch b/netpbm-gcc4.patch
index 9ecd296..3f51826 100644
--- a/netpbm-gcc4.patch
+++ b/netpbm-gcc4.patch
@@ -1,5 +1,6 @@
---- netpbm-10.30/lib/pm.h.gcc4	2005-10-21 12:19:56.000000000 +0200
-+++ netpbm-10.30/lib/pm.h	2005-10-21 12:20:03.000000000 +0200
+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 <sys/types.h>
  #include <ctype.h>
@@ -8,13 +9,14 @@
  #include <errno.h>
  #include <setjmp.h>
  #include <sys/stat.h>
---- netpbm-10.30/urt/rle.h.gcc4	2005-10-21 12:19:56.000000000 +0200
-+++ netpbm-10.30/urt/rle.h	2005-10-21 12:21:31.000000000 +0200
-@@ -36,6 +36,7 @@
- #include "rle_config.h"     /* Configuration parameters. */
+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 <stdio.h>      /* Declare FILE. */
 +#include <string.h>
  
- #ifdef c_plusplus
- #define USE_PROTOTYPES
+ enum rle_dispatch {
+     NO_DISPATCH = -1,
diff --git a/netpbm-manfix.patch b/netpbm-manfix.patch
index 691fffd..4947e49 100644
--- a/netpbm-manfix.patch
+++ b/netpbm-manfix.patch
@@ -1,6 +1,6 @@
-diff -up netpbm-10.47.21/userguide/avstopam.html.manfix netpbm-10.47.21/userguide/avstopam.html
---- netpbm-10.47.21/userguide/avstopam.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/avstopam.html	2010-10-19 13:26:14.553008174 +0200
+diff -up netpbm-10.58.01/userguide/avstopam.html.manfix netpbm-10.58.01/userguide/avstopam.html
+--- netpbm-10.58.01/userguide/avstopam.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/avstopam.html	2012-04-09 15:42:52.968497437 +0200
 @@ -1,8 +1,7 @@
 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
@@ -12,9 +12,9 @@ diff -up netpbm-10.47.21/userguide/avstopam.html.manfix netpbm-10.47.21/userguid
  </head>
  
  <body>
-diff -up netpbm-10.47.21/userguide/escp2topbm.html.manfix netpbm-10.47.21/userguide/escp2topbm.html
---- netpbm-10.47.21/userguide/escp2topbm.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/escp2topbm.html	2010-10-19 13:26:14.553008174 +0200
+diff -up netpbm-10.58.01/userguide/escp2topbm.html.manfix netpbm-10.58.01/userguide/escp2topbm.html
+--- netpbm-10.58.01/userguide/escp2topbm.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/escp2topbm.html	2012-04-09 15:42:52.968497437 +0200
 @@ -2,10 +2,11 @@
  <HTML><HEAD><TITLE>Escp2topbm User Manual</TITLE></HEAD>
  <BODY>
@@ -28,9 +28,9 @@ diff -up netpbm-10.47.21/userguide/escp2topbm.html.manfix netpbm-10.47.21/usergu
  escp2topbm - convert an ESC/P2 printer file to a PBM image
  
  <H2 id="synopsis">SYNOPSIS</H2>
-diff -up netpbm-10.47.21/userguide/faxformat.html.manfix netpbm-10.47.21/userguide/faxformat.html
---- netpbm-10.47.21/userguide/faxformat.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/faxformat.html	2010-10-19 13:30:27.134202295 +0200
+diff -up netpbm-10.58.01/userguide/faxformat.html.manfix netpbm-10.58.01/userguide/faxformat.html
+--- netpbm-10.58.01/userguide/faxformat.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/faxformat.html	2012-04-09 15:42:52.969497425 +0200
 @@ -5,10 +5,12 @@
  Updated: 03 December 2008
  <BR>
@@ -44,9 +44,9 @@ diff -up netpbm-10.47.21/userguide/faxformat.html.manfix netpbm-10.47.21/usergui
  <p>The ITU (formerly CCITT) publishes standards for operation of fax machines
  (the idea is to provide a way to be sure that a fax machine is able to receive
  a fax sent by another).  These standards incidentally specify graphics file
-diff -up netpbm-10.47.21/userguide/pampaintspill.html.manfix netpbm-10.47.21/userguide/pampaintspill.html
---- netpbm-10.47.21/userguide/pampaintspill.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pampaintspill.html	2010-10-19 13:26:14.554008174 +0200
+diff -up netpbm-10.58.01/userguide/pampaintspill.html.manfix netpbm-10.58.01/userguide/pampaintspill.html
+--- netpbm-10.58.01/userguide/pampaintspill.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pampaintspill.html	2012-04-09 15:42:52.969497425 +0200
 @@ -1,8 +1,7 @@
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
 -<html xmlns="http://www.w3.org/1999/xhtml">
@@ -65,9 +65,9 @@ diff -up netpbm-10.47.21/userguide/pampaintspill.html.manfix netpbm-10.47.21/use
  <p>pampaintspill - smoothly spill colors into the background</p>
  
  <h2><a name="synopsis">SYNOPSIS</a></h2>
-diff -up netpbm-10.47.21/userguide/pamrecolor.html.manfix netpbm-10.47.21/userguide/pamrecolor.html
---- netpbm-10.47.21/userguide/pamrecolor.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pamrecolor.html	2010-10-19 13:26:14.554008174 +0200
+diff -up netpbm-10.58.01/userguide/pamrecolor.html.manfix netpbm-10.58.01/userguide/pamrecolor.html
+--- netpbm-10.58.01/userguide/pamrecolor.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pamrecolor.html	2012-04-09 15:42:52.969497425 +0200
 @@ -1,8 +1,7 @@
 -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
@@ -87,9 +87,9 @@ diff -up netpbm-10.47.21/userguide/pamrecolor.html.manfix netpbm-10.47.21/usergu
  
  
  <h2 id="name">NAME</h2>
-diff -up netpbm-10.47.21/userguide/pamsistoaglyph.html.manfix netpbm-10.47.21/userguide/pamsistoaglyph.html
---- netpbm-10.47.21/userguide/pamsistoaglyph.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pamsistoaglyph.html	2010-10-19 13:26:14.555008174 +0200
+diff -up netpbm-10.58.01/userguide/pamsistoaglyph.html.manfix netpbm-10.58.01/userguide/pamsistoaglyph.html
+--- netpbm-10.58.01/userguide/pamsistoaglyph.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pamsistoaglyph.html	2012-04-09 15:42:52.971497399 +0200
 @@ -1,8 +1,7 @@
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
 -<html xmlns="http://www.w3.org/1999/xhtml">
@@ -100,9 +100,9 @@ diff -up netpbm-10.47.21/userguide/pamsistoaglyph.html.manfix netpbm-10.47.21/us
  </head>
  
  <body>
-diff -up netpbm-10.47.21/userguide/pamstereogram.html.manfix netpbm-10.47.21/userguide/pamstereogram.html
---- netpbm-10.47.21/userguide/pamstereogram.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pamstereogram.html	2010-10-19 13:26:14.555008174 +0200
+diff -up netpbm-10.58.01/userguide/pamstereogram.html.manfix netpbm-10.58.01/userguide/pamstereogram.html
+--- netpbm-10.58.01/userguide/pamstereogram.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pamstereogram.html	2012-04-09 15:42:52.971497399 +0200
 @@ -1,5 +1,5 @@
 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "DTD/xhtml11.dtd">
 -<html xmlns="http://www.w3.org/1999/xhtml">
@@ -120,9 +120,9 @@ diff -up netpbm-10.47.21/userguide/pamstereogram.html.manfix netpbm-10.47.21/use
  
  
  <h2 id="name">NAME</h2>
-diff -up netpbm-10.47.21/userguide/pamtoavs.html.manfix netpbm-10.47.21/userguide/pamtoavs.html
---- netpbm-10.47.21/userguide/pamtoavs.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pamtoavs.html	2010-10-19 13:26:14.556008174 +0200
+diff -up netpbm-10.58.01/userguide/pamtoavs.html.manfix netpbm-10.58.01/userguide/pamtoavs.html
+--- netpbm-10.58.01/userguide/pamtoavs.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pamtoavs.html	2012-04-09 15:42:52.971497400 +0200
 @@ -1,8 +1,7 @@
 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
@@ -134,9 +134,9 @@ diff -up netpbm-10.47.21/userguide/pamtoavs.html.manfix netpbm-10.47.21/userguid
  </head>
  
  <body>
-diff -up netpbm-10.47.21/userguide/pamtooctaveimg.html.manfix netpbm-10.47.21/userguide/pamtooctaveimg.html
---- netpbm-10.47.21/userguide/pamtooctaveimg.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pamtooctaveimg.html	2010-10-19 13:26:14.557008174 +0200
+diff -up netpbm-10.58.01/userguide/pamtooctaveimg.html.manfix netpbm-10.58.01/userguide/pamtooctaveimg.html
+--- netpbm-10.58.01/userguide/pamtooctaveimg.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pamtooctaveimg.html	2012-04-09 15:42:52.971497400 +0200
 @@ -1,8 +1,7 @@
 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
@@ -148,9 +148,9 @@ diff -up netpbm-10.47.21/userguide/pamtooctaveimg.html.manfix netpbm-10.47.21/us
  </head>
  
  <body>
-diff -up netpbm-10.47.21/userguide/pnmflip.html.manfix netpbm-10.47.21/userguide/pnmflip.html
---- netpbm-10.47.21/userguide/pnmflip.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pnmflip.html	2010-10-19 13:32:04.939317059 +0200
+diff -up netpbm-10.58.01/userguide/pnmflip.html.manfix netpbm-10.58.01/userguide/pnmflip.html
+--- netpbm-10.58.01/userguide/pnmflip.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pnmflip.html	2012-04-09 15:42:52.971497400 +0200
 @@ -4,9 +4,11 @@
  <BODY>
  <H1>pnmflip</H1>
@@ -163,9 +163,9 @@ diff -up netpbm-10.47.21/userguide/pnmflip.html.manfix netpbm-10.47.21/userguide
  <P><B>pamflip</b> is mostly backward compatible with <b>pnmflip</b>,
  but works on PAM images too.
  
-diff -up netpbm-10.47.21/userguide/pnmmercator.html.manfix netpbm-10.47.21/userguide/pnmmercator.html
---- netpbm-10.47.21/userguide/pnmmercator.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pnmmercator.html	2010-10-19 13:26:14.557008174 +0200
+diff -up netpbm-10.58.01/userguide/pnmmercator.html.manfix netpbm-10.58.01/userguide/pnmmercator.html
+--- netpbm-10.58.01/userguide/pnmmercator.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pnmmercator.html	2012-04-09 15:42:52.972497387 +0200
 @@ -1,7 +1,6 @@
 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
@@ -175,24 +175,24 @@ diff -up netpbm-10.47.21/userguide/pnmmercator.html.manfix netpbm-10.47.21/userg
  <title>PnmMercator User Manual</title>
  </head>
  <body>
-diff -up netpbm-10.47.21/userguide/pnmtotiff.html.manfix netpbm-10.47.21/userguide/pnmtotiff.html
---- netpbm-10.47.21/userguide/pnmtotiff.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/pnmtotiff.html	2010-10-19 13:26:14.558008174 +0200
+diff -up netpbm-10.58.01/userguide/pnmtotiff.html.manfix netpbm-10.58.01/userguide/pnmtotiff.html
+--- netpbm-10.58.01/userguide/pnmtotiff.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/pnmtotiff.html	2012-04-09 15:42:52.972497387 +0200
 @@ -1,5 +1,4 @@
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
 -<!>
  <html><head>
  <title>pnmtotiff</title>
  </head><body>
-diff -up netpbm-10.47.21/userguide/ppmtogif.html.manfix netpbm-10.47.21/userguide/ppmtogif.html
---- netpbm-10.47.21/userguide/ppmtogif.html.manfix	2010-10-18 07:23:41.000000000 +0200
-+++ netpbm-10.47.21/userguide/ppmtogif.html	2010-10-19 13:26:14.558008174 +0200
+diff -up netpbm-10.58.01/userguide/ppmtogif.html.manfix netpbm-10.58.01/userguide/ppmtogif.html
+--- netpbm-10.58.01/userguide/ppmtogif.html.manfix	2012-04-09 15:31:58.000000000 +0200
++++ netpbm-10.58.01/userguide/ppmtogif.html	2012-04-09 15:44:34.918222888 +0200
 @@ -4,11 +4,14 @@
  <BODY>
  <H1>ppmtogif</H1>
  <BR>
 +<H2>NAME</H2>
- <p><b>ppmtogif</b> was replaced in Netpbm 10.37 (December 2002) by
+ <p><b>ppmtogif</b> was replaced in Netpbm 10.37 (December 2006) by
  <b><a href="pamtogif.html">pamtogif</a></b>.
  
 +<H2>SYNOPSIS</H2>
diff --git a/netpbm-pnmtopclxl.patch b/netpbm-pnmtopclxl.patch
new file mode 100644
index 0000000..dc67040
--- /dev/null
+++ b/netpbm-pnmtopclxl.patch
@@ -0,0 +1,16 @@
+diff -up netpbm-10.58.01/converter/other/pnmtopclxl.c.pnmtopclxl netpbm-10.58.01/converter/other/pnmtopclxl.c
+--- netpbm-10.58.01/converter/other/pnmtopclxl.c.pnmtopclxl	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/pnmtopclxl.c	2012-06-13 15:39:17.566141565 +0200
+@@ -269,10 +269,10 @@ XY_RLEnew(size_t const size) {
+ 
+     MALLOCVAR(rleP);
+     if (rleP) {
+-        rleP->fbuf = malloc(size);
++        rleP->fbufsize = MAX(1024, size);
++        rleP->fbuf = malloc(rleP->fbufsize);
+ 
+         if (rleP->fbuf) {
+-            rleP->fbufsize = MAX(1024, size);
+             retval = rleP;
+         } else
+             retval = NULL;
diff --git a/netpbm-ppmtopict.patch b/netpbm-ppmtopict.patch
new file mode 100644
index 0000000..97b7d2b
--- /dev/null
+++ b/netpbm-ppmtopict.patch
@@ -0,0 +1,12 @@
+diff -up netpbm-10.58.01/converter/ppm/ppmtopict.c.ppmtopict netpbm-10.58.01/converter/ppm/ppmtopict.c
+--- netpbm-10.58.01/converter/ppm/ppmtopict.c.ppmtopict	2012-06-13 09:52:42.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtopict.c	2012-06-13 11:33:11.134747363 +0200
+@@ -200,7 +200,7 @@ putRow(FILE * const ifP,
+        pixel *      const rowpixels,
+        char *       const packed) {
+ 
+-    unsigned int i;
++    int i;
+     unsigned int count;
+     unsigned int run;
+     unsigned int rep;
diff --git a/netpbm-security-code.patch b/netpbm-security-code.patch
index 373c86d..1ae5bcf 100644
--- a/netpbm-security-code.patch
+++ b/netpbm-security-code.patch
@@ -1,6 +1,6 @@
-diff -up netpbm-10.56.03/analyzer/pgmtexture.c.security-code netpbm-10.56.03/analyzer/pgmtexture.c
---- netpbm-10.56.03/analyzer/pgmtexture.c.security-code	2011-11-09 09:17:48.000000000 +0100
-+++ netpbm-10.56.03/analyzer/pgmtexture.c	2011-11-09 13:34:31.216370336 +0100
+diff -up netpbm-10.58.01/analyzer/pgmtexture.c.security-code netpbm-10.58.01/analyzer/pgmtexture.c
+--- netpbm-10.58.01/analyzer/pgmtexture.c.security-code	2012-04-09 15:31:32.000000000 +0200
++++ netpbm-10.58.01/analyzer/pgmtexture.c	2012-04-09 15:40:03.183620040 +0200
 @@ -97,7 +97,7 @@ vector(unsigned int const nl,
      float * v;
  
@@ -27,9 +27,9 @@ diff -up netpbm-10.56.03/analyzer/pgmtexture.c.security-code netpbm-10.56.03/ana
      /* allocate rows and set pointers to them */
      for (i = nrl; i <= nrh; ++i) {
          MALLOCARRAY(m[i], (unsigned) (nch - ncl + 1));
-diff -up netpbm-10.56.03/converter/other/gemtopnm.c.security-code netpbm-10.56.03/converter/other/gemtopnm.c
---- netpbm-10.56.03/converter/other/gemtopnm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/gemtopnm.c	2011-11-09 13:11:20.643591439 +0100
+diff -up netpbm-10.58.01/converter/other/gemtopnm.c.security-code netpbm-10.58.01/converter/other/gemtopnm.c
+--- netpbm-10.58.01/converter/other/gemtopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/gemtopnm.c	2012-04-09 15:40:03.183620040 +0200
 @@ -106,6 +106,7 @@ main(argc, argv)
  
  	pnm_writepnminit( stdout, cols, rows, MAXVAL, type, 0 );
@@ -38,9 +38,9 @@ diff -up netpbm-10.56.03/converter/other/gemtopnm.c.security-code netpbm-10.56.0
      { 
          /* allocate input row data structure */
          int plane;
-diff -up netpbm-10.56.03/converter/other/jpegtopnm.c.security-code netpbm-10.56.03/converter/other/jpegtopnm.c
---- netpbm-10.56.03/converter/other/jpegtopnm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/jpegtopnm.c	2011-11-09 13:11:20.644591445 +0100
+diff -up netpbm-10.58.01/converter/other/jpegtopnm.c.security-code netpbm-10.58.01/converter/other/jpegtopnm.c
+--- netpbm-10.58.01/converter/other/jpegtopnm.c.security-code	2012-04-09 15:31:40.000000000 +0200
++++ netpbm-10.58.01/converter/other/jpegtopnm.c	2012-04-09 15:40:03.184620028 +0200
 @@ -861,6 +861,8 @@ convertImage(FILE *
      /* Calculate output image dimensions so we can allocate space */
      jpeg_calc_output_dimensions(cinfoP);
@@ -50,9 +50,9 @@ diff -up netpbm-10.56.03/converter/other/jpegtopnm.c.security-code netpbm-10.56.
      /* Start decompressor */
      jpeg_start_decompress(cinfoP);
  
-diff -up netpbm-10.56.03/converter/other/pbmtopgm.c.security-code netpbm-10.56.03/converter/other/pbmtopgm.c
---- netpbm-10.56.03/converter/other/pbmtopgm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/pbmtopgm.c	2011-11-09 13:11:20.644591445 +0100
+diff -up netpbm-10.58.01/converter/other/pbmtopgm.c.security-code netpbm-10.58.01/converter/other/pbmtopgm.c
+--- netpbm-10.58.01/converter/other/pbmtopgm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/pbmtopgm.c	2012-04-09 15:40:03.184620028 +0200
 @@ -47,6 +47,7 @@ main(int argc, char *argv[]) {
                   "than the image height (%u rows)", height, rows);
  
@@ -61,9 +61,9 @@ diff -up netpbm-10.56.03/converter/other/pbmtopgm.c.security-code netpbm-10.56.0
      maxval = MIN(PGM_OVERALLMAXVAL, width*height);
      pgm_writepgminit(stdout, cols, rows, maxval, 0) ;
  
-diff -up netpbm-10.56.03/converter/other/pnmtoddif.c.security-code netpbm-10.56.03/converter/other/pnmtoddif.c
---- netpbm-10.56.03/converter/other/pnmtoddif.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/pnmtoddif.c	2011-11-09 13:11:20.645591451 +0100
+diff -up netpbm-10.58.01/converter/other/pnmtoddif.c.security-code netpbm-10.58.01/converter/other/pnmtoddif.c
+--- netpbm-10.58.01/converter/other/pnmtoddif.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/pnmtoddif.c	2012-04-09 15:40:03.185620015 +0200
 @@ -632,6 +632,7 @@ main(int argc, char *argv[]) {
      switch (PNM_FORMAT_TYPE(format)) {
      case PBM_TYPE:
@@ -80,9 +80,9 @@ diff -up netpbm-10.56.03/converter/other/pnmtoddif.c.security-code netpbm-10.56.
          ip.bytes_per_line = 3 * cols;
          ip.bits_per_pixel = 24;
          ip.spectral = 5;
-diff -up netpbm-10.56.03/converter/other/pnmtojpeg.c.security-code netpbm-10.56.03/converter/other/pnmtojpeg.c
---- netpbm-10.56.03/converter/other/pnmtojpeg.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/pnmtojpeg.c	2011-11-09 13:11:20.646591457 +0100
+diff -up netpbm-10.58.01/converter/other/pnmtojpeg.c.security-code netpbm-10.58.01/converter/other/pnmtojpeg.c
+--- netpbm-10.58.01/converter/other/pnmtojpeg.c.security-code	2012-04-09 15:31:39.000000000 +0200
++++ netpbm-10.58.01/converter/other/pnmtojpeg.c	2012-04-09 15:40:03.186620002 +0200
 @@ -605,7 +605,11 @@ read_scan_script(j_compress_ptr const ci
             want JPOOL_PERMANENT.  
          */
@@ -113,9 +113,9 @@ diff -up netpbm-10.56.03/converter/other/pnmtojpeg.c.security-code netpbm-10.56.
    buffer = (*cinfo_p->mem->alloc_sarray)
      ((j_common_ptr) cinfo_p, JPOOL_IMAGE,
       (unsigned int) cinfo_p->image_width * cinfo_p->input_components, 
-diff -up netpbm-10.56.03/converter/other/pnmtops.c.security-code netpbm-10.56.03/converter/other/pnmtops.c
---- netpbm-10.56.03/converter/other/pnmtops.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/pnmtops.c	2011-11-09 14:27:34.229742326 +0100
+diff -up netpbm-10.58.01/converter/other/pnmtops.c.security-code netpbm-10.58.01/converter/other/pnmtops.c
+--- netpbm-10.58.01/converter/other/pnmtops.c.security-code	2012-04-09 15:31:40.000000000 +0200
++++ netpbm-10.58.01/converter/other/pnmtops.c	2012-04-09 15:40:03.187619989 +0200
 @@ -256,17 +256,21 @@ parseCommandLine(int argc, const char **
      validateCompDimension(width, 72, "-width value");
      validateCompDimension(height, 72, "-height value");
@@ -139,9 +139,9 @@ diff -up netpbm-10.56.03/converter/other/pnmtops.c.security-code netpbm-10.56.03
          cmdlineP->imageheight = imageheight * 72;
      }
      else
-diff -up netpbm-10.56.03/converter/other/pnmtorle.c.security-code netpbm-10.56.03/converter/other/pnmtorle.c
---- netpbm-10.56.03/converter/other/pnmtorle.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/pnmtorle.c	2011-11-09 13:11:20.648591469 +0100
+diff -up netpbm-10.58.01/converter/other/pnmtorle.c.security-code netpbm-10.58.01/converter/other/pnmtorle.c
+--- netpbm-10.58.01/converter/other/pnmtorle.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/pnmtorle.c	2012-04-09 15:40:03.188619976 +0200
 @@ -19,6 +19,8 @@
   * If you modify this software, you should include a notice giving the
   * name of the person performing the modification, the date of modification,
@@ -151,9 +151,9 @@ diff -up netpbm-10.56.03/converter/other/pnmtorle.c.security-code netpbm-10.56.0
   */
  /*
   * pnmtorle - A program which will convert pbmplus (ppm or pgm) images
-diff -up netpbm-10.56.03/converter/other/pnmtosgi.c.security-code netpbm-10.56.03/converter/other/pnmtosgi.c
---- netpbm-10.56.03/converter/other/pnmtosgi.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/pnmtosgi.c	2011-11-09 13:11:20.648591469 +0100
+diff -up netpbm-10.58.01/converter/other/pnmtosgi.c.security-code netpbm-10.58.01/converter/other/pnmtosgi.c
+--- netpbm-10.58.01/converter/other/pnmtosgi.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/pnmtosgi.c	2012-04-09 15:40:03.188619976 +0200
 @@ -254,6 +254,7 @@ build_channels(FILE * const ifp, int con
  #endif
  
@@ -171,9 +171,9 @@ diff -up netpbm-10.56.03/converter/other/pnmtosgi.c.security-code netpbm-10.56.0
              len = rle_compress(temp, cols);    /* writes result into rletemp */
              channel[chan_no][row].length = len;
              MALLOCARRAY(p, len);
-diff -up netpbm-10.56.03/converter/other/rletopnm.c.security-code netpbm-10.56.03/converter/other/rletopnm.c
---- netpbm-10.56.03/converter/other/rletopnm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/rletopnm.c	2011-11-09 13:11:20.649591475 +0100
+diff -up netpbm-10.58.01/converter/other/rletopnm.c.security-code netpbm-10.58.01/converter/other/rletopnm.c
+--- netpbm-10.58.01/converter/other/rletopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/rletopnm.c	2012-04-09 15:40:03.189619963 +0200
 @@ -19,6 +19,8 @@
   * If you modify this software, you should include a notice giving the
   * name of the person performing the modification, the date of modification,
@@ -183,9 +183,9 @@ diff -up netpbm-10.56.03/converter/other/rletopnm.c.security-code netpbm-10.56.0
   */
  /*
   * rletopnm - A conversion program to convert from Utah's "rle" image format
-diff -up netpbm-10.56.03/converter/other/sgitopnm.c.security-code netpbm-10.56.03/converter/other/sgitopnm.c
---- netpbm-10.56.03/converter/other/sgitopnm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/sgitopnm.c	2011-11-09 14:31:58.849972480 +0100
+diff -up netpbm-10.58.01/converter/other/sgitopnm.c.security-code netpbm-10.58.01/converter/other/sgitopnm.c
+--- netpbm-10.58.01/converter/other/sgitopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/sgitopnm.c	2012-04-09 15:40:03.189619963 +0200
 @@ -359,10 +359,14 @@ readChannels(FILE *       const ifP,
          MALLOCARRAY_NOFAIL(image, head->ysize);
      } else {
@@ -202,9 +202,9 @@ diff -up netpbm-10.56.03/converter/other/sgitopnm.c.security-code netpbm-10.56.0
  
      for (channel = 0; channel < maxchannel; ++channel) {
          unsigned int row;
-diff -up netpbm-10.56.03/converter/other/sirtopnm.c.security-code netpbm-10.56.03/converter/other/sirtopnm.c
---- netpbm-10.56.03/converter/other/sirtopnm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/sirtopnm.c	2011-11-09 13:11:20.650591481 +0100
+diff -up netpbm-10.58.01/converter/other/sirtopnm.c.security-code netpbm-10.58.01/converter/other/sirtopnm.c
+--- netpbm-10.58.01/converter/other/sirtopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/sirtopnm.c	2012-04-09 15:40:03.190619951 +0200
 @@ -69,6 +69,7 @@ char* argv[];
  	    }
  	    break;
@@ -213,9 +213,9 @@ diff -up netpbm-10.56.03/converter/other/sirtopnm.c.security-code netpbm-10.56.0
  	    picsize = cols * rows * 3;
  	    planesize = cols * rows;
              if ( !( sirarray = (unsigned char*) malloc( picsize ) ) ) 
-diff -up netpbm-10.56.03/converter/other/tifftopnm.c.security-code netpbm-10.56.03/converter/other/tifftopnm.c
---- netpbm-10.56.03/converter/other/tifftopnm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/tifftopnm.c	2011-11-09 13:11:20.651591487 +0100
+diff -up netpbm-10.58.01/converter/other/tifftopnm.c.security-code netpbm-10.58.01/converter/other/tifftopnm.c
+--- netpbm-10.58.01/converter/other/tifftopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/other/tifftopnm.c	2012-04-09 15:40:03.191619939 +0200
 @@ -1279,7 +1279,9 @@ convertRasterByRows(pnmOut *       const
      if (scanbuf == NULL)
          pm_error("can't allocate memory for scanline buffer");
@@ -227,9 +227,9 @@ diff -up netpbm-10.56.03/converter/other/tifftopnm.c.security-code netpbm-10.56.
      if (samplebuf == NULL)
          pm_error("can't allocate memory for row buffer");
  
-diff -up netpbm-10.56.03/converter/other/xwdtopnm.c.security-code netpbm-10.56.03/converter/other/xwdtopnm.c
---- netpbm-10.56.03/converter/other/xwdtopnm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/other/xwdtopnm.c	2011-11-09 13:11:20.653591497 +0100
+diff -up netpbm-10.58.01/converter/other/xwdtopnm.c.security-code netpbm-10.58.01/converter/other/xwdtopnm.c
+--- netpbm-10.58.01/converter/other/xwdtopnm.c.security-code	2012-04-09 15:31:40.000000000 +0200
++++ netpbm-10.58.01/converter/other/xwdtopnm.c	2012-04-09 15:40:03.192619927 +0200
 @@ -209,6 +209,10 @@ processX10Header(X10WDFileHeader *  cons
          *colorsP = pnm_allocrow(2);
          PNM_ASSIGN1((*colorsP)[0], 0);
@@ -249,9 +249,9 @@ diff -up netpbm-10.56.03/converter/other/xwdtopnm.c.security-code netpbm-10.56.0
      *padrightP =
          h11FixedP->bytes_per_line * 8 -
          h11FixedP->pixmap_width * h11FixedP->bits_per_pixel;
-diff -up netpbm-10.56.03/converter/pbm/mdatopbm.c.security-code netpbm-10.56.03/converter/pbm/mdatopbm.c
---- netpbm-10.56.03/converter/pbm/mdatopbm.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/mdatopbm.c	2011-11-09 13:11:20.654591503 +0100
+diff -up netpbm-10.58.01/converter/pbm/mdatopbm.c.security-code netpbm-10.58.01/converter/pbm/mdatopbm.c
+--- netpbm-10.58.01/converter/pbm/mdatopbm.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/mdatopbm.c	2012-04-09 15:40:03.192619927 +0200
 @@ -245,10 +245,13 @@ main(int argc, char **argv) {
          pm_readlittleshort(infile, &yy); nInCols = yy;
      }
@@ -267,9 +267,9 @@ diff -up netpbm-10.56.03/converter/pbm/mdatopbm.c.security-code netpbm-10.56.03/
  
      data = pbm_allocarray(nOutCols, nOutRows);
      
-diff -up netpbm-10.56.03/converter/pbm/mgrtopbm.c.security-code netpbm-10.56.03/converter/pbm/mgrtopbm.c
---- netpbm-10.56.03/converter/pbm/mgrtopbm.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/mgrtopbm.c	2011-11-09 13:11:20.655591509 +0100
+diff -up netpbm-10.58.01/converter/pbm/mgrtopbm.c.security-code netpbm-10.58.01/converter/pbm/mgrtopbm.c
+--- netpbm-10.58.01/converter/pbm/mgrtopbm.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/mgrtopbm.c	2012-04-09 15:40:03.193619915 +0200
 @@ -65,6 +65,8 @@ readMgrHeader(FILE *          const ifP,
      if (head.h_high < ' ' || head.l_high < ' ')
          pm_error("Invalid width field in MGR header");
@@ -279,10 +279,9 @@ diff -up netpbm-10.56.03/converter/pbm/mgrtopbm.c.security-code netpbm-10.56.03/
      *colsP = (((int)head.h_wide - ' ') << 6) + ((int)head.l_wide - ' ');
      *rowsP = (((int)head.h_high - ' ') << 6) + ((int) head.l_high - ' ');
      *padrightP = ( ( *colsP + pad - 1 ) / pad ) * pad - *colsP;
-diff -up netpbm-10.56.03/converter/pbm/pbmtoascii.c.security-code netpbm-10.56.03/converter/pbm/pbmtoascii.c
-diff -up netpbm-10.56.03/converter/pbm/pbmtogem.c.security-code netpbm-10.56.03/converter/pbm/pbmtogem.c
---- netpbm-10.56.03/converter/pbm/pbmtogem.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtogem.c	2011-11-09 13:11:20.657591521 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtogem.c.security-code netpbm-10.58.01/converter/pbm/pbmtogem.c
+--- netpbm-10.58.01/converter/pbm/pbmtogem.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtogem.c	2012-04-09 15:40:03.193619915 +0200
 @@ -79,6 +79,7 @@ putinit (int const rows, int const cols)
    bitsperitem = 0;
    bitshift = 7;
@@ -291,9 +290,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtogem.c.security-code netpbm-10.56.03/
    outmax = (cols + 7) / 8;
    outrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char));
    lastrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char));
-diff -up netpbm-10.56.03/converter/pbm/pbmtogo.c.security-code netpbm-10.56.03/converter/pbm/pbmtogo.c
---- netpbm-10.56.03/converter/pbm/pbmtogo.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtogo.c	2011-11-09 13:11:20.657591521 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtogo.c.security-code netpbm-10.58.01/converter/pbm/pbmtogo.c
+--- netpbm-10.58.01/converter/pbm/pbmtogo.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtogo.c	2012-04-09 15:40:03.193619915 +0200
 @@ -158,6 +158,7 @@ main(int           argc,
      bitrow = pbm_allocrow(cols);
  
@@ -302,9 +301,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtogo.c.security-code netpbm-10.56.03/c
      rucols = ( cols + 7 ) / 8;
      bytesperrow = rucols;       /* GraphOn uses bytes */
      rucols = rucols * 8;
-diff -up netpbm-10.56.03/converter/pbm/pbmtolj.c.security-code netpbm-10.56.03/converter/pbm/pbmtolj.c
---- netpbm-10.56.03/converter/pbm/pbmtolj.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtolj.c	2011-11-09 13:11:20.658591527 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtolj.c.security-code netpbm-10.58.01/converter/pbm/pbmtolj.c
+--- netpbm-10.58.01/converter/pbm/pbmtolj.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtolj.c	2012-04-09 15:40:03.194619902 +0200
 @@ -120,7 +120,11 @@ parseCommandLine(int argc, char ** argv,
  static void
  allocateBuffers(unsigned int const cols) {
@@ -317,9 +316,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtolj.c.security-code netpbm-10.56.03/c
      packBufferSize = rowBufferSize + (rowBufferSize + 127) / 128 + 1;
      deltaBufferSize = rowBufferSize + rowBufferSize / 8 + 10;
  
-diff -up netpbm-10.56.03/converter/pbm/pbmtomacp.c.security-code netpbm-10.56.03/converter/pbm/pbmtomacp.c
---- netpbm-10.56.03/converter/pbm/pbmtomacp.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtomacp.c	2011-11-09 13:11:20.658591527 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtomacp.c.security-code netpbm-10.58.01/converter/pbm/pbmtomacp.c
+--- netpbm-10.58.01/converter/pbm/pbmtomacp.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtomacp.c	2012-04-09 15:40:03.195619889 +0200
 @@ -101,6 +101,7 @@ char *argv[];
    if( !lflg )
      left = 0;
@@ -337,9 +336,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtomacp.c.security-code netpbm-10.56.03
    if( bflg )
    { if( bottom - top >= MAX_LINES )
        bottom = top + MAX_LINES - 1;
-diff -up netpbm-10.56.03/converter/pbm/pbmtomda.c.security-code netpbm-10.56.03/converter/pbm/pbmtomda.c
---- netpbm-10.56.03/converter/pbm/pbmtomda.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtomda.c	2011-11-09 13:11:20.659591533 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtomda.c.security-code netpbm-10.58.01/converter/pbm/pbmtomda.c
+--- netpbm-10.58.01/converter/pbm/pbmtomda.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtomda.c	2012-04-09 15:40:03.195619889 +0200
 @@ -179,6 +179,7 @@ int main(int argc, char **argv)
      
      nOutRowsUnrounded = bScale ? nInRows/2 : nInRows;
@@ -348,9 +347,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtomda.c.security-code netpbm-10.56.03/
      nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4;
          /* MDA wants rows a multiple of 4 */   
      nOutCols = nInCols / 8;
-diff -up netpbm-10.56.03/converter/pbm/pbmtoppa/pbm.c.security-code netpbm-10.56.03/converter/pbm/pbmtoppa/pbm.c
---- netpbm-10.56.03/converter/pbm/pbmtoppa/pbm.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtoppa/pbm.c	2011-11-09 13:11:20.659591533 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c.security-code netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c
+--- netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c	2012-04-09 15:40:03.195619889 +0200
 @@ -105,6 +105,7 @@ int pbm_readline(pbm_stat* pbm,unsigned
      return 0;
  
@@ -369,9 +368,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtoppa/pbm.c.security-code netpbm-10.56
    memcpy (pbm->revdata, data, (pbm->width+7)/8);
    pbm->current_line--;
  }
-diff -up netpbm-10.56.03/converter/pbm/pbmtoppa/pbmtoppa.c.security-code netpbm-10.56.03/converter/pbm/pbmtoppa/pbmtoppa.c
---- netpbm-10.56.03/converter/pbm/pbmtoppa/pbmtoppa.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtoppa/pbmtoppa.c	2011-11-09 13:11:20.660591539 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c.security-code netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c
+--- netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c	2012-04-09 15:40:03.196619876 +0200
 @@ -441,6 +441,7 @@ main(int argc, char *argv[]) {
              pm_error("main(): unrecognized parameter '%s'", argv[argn]);
      }
@@ -380,9 +379,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtoppa/pbmtoppa.c.security-code netpbm-
      Pwidth=(Width+7)/8;
      printer.fptr=out;
  
-diff -up netpbm-10.56.03/converter/pbm/pbmtoxbm.c.security-code netpbm-10.56.03/converter/pbm/pbmtoxbm.c
---- netpbm-10.56.03/converter/pbm/pbmtoxbm.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtoxbm.c	2011-11-09 13:11:20.660591539 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtoxbm.c.security-code netpbm-10.58.01/converter/pbm/pbmtoxbm.c
+--- netpbm-10.58.01/converter/pbm/pbmtoxbm.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtoxbm.c	2012-04-09 15:40:03.196619876 +0200
 @@ -335,6 +335,8 @@ convertRaster(FILE *          const ifP,
  
      unsigned char * bitrow;
@@ -392,9 +391,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtoxbm.c.security-code netpbm-10.56.03/
  
      putinit(xbmVersion);
  
-diff -up netpbm-10.56.03/converter/pbm/pbmtoybm.c.security-code netpbm-10.56.03/converter/pbm/pbmtoybm.c
---- netpbm-10.56.03/converter/pbm/pbmtoybm.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtoybm.c	2011-11-09 13:36:51.894456270 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtoybm.c.security-code netpbm-10.58.01/converter/pbm/pbmtoybm.c
+--- netpbm-10.58.01/converter/pbm/pbmtoybm.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtoybm.c	2012-04-09 15:40:03.197619863 +0200
 @@ -113,6 +113,7 @@ main(int argc, const char *argv[]) {
      bitrow = pbm_allocrow(cols);
      
@@ -403,9 +402,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtoybm.c.security-code netpbm-10.56.03/
      padright = ((cols + 15) / 16) * 16 - cols;
  
      putinit(cols, rows);
-diff -up netpbm-10.56.03/converter/pbm/pbmtozinc.c.security-code netpbm-10.56.03/converter/pbm/pbmtozinc.c
---- netpbm-10.56.03/converter/pbm/pbmtozinc.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmtozinc.c	2011-11-09 13:11:20.661591545 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmtozinc.c.security-code netpbm-10.58.01/converter/pbm/pbmtozinc.c
+--- netpbm-10.58.01/converter/pbm/pbmtozinc.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmtozinc.c	2012-04-09 15:40:03.197619863 +0200
 @@ -65,6 +65,7 @@ main(int argc, char * argv[]) {
      bitrow = pbm_allocrow( cols );
  
@@ -414,9 +413,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmtozinc.c.security-code netpbm-10.56.03
      padright = ( ( cols + 15 ) / 16 ) * 16 - cols;
  
      printf( "USHORT %s[] = {\n",name);
-diff -up netpbm-10.56.03/converter/pbm/pbmto10x.c.security-code netpbm-10.56.03/converter/pbm/pbmto10x.c
---- netpbm-10.56.03/converter/pbm/pbmto10x.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmto10x.c	2011-11-09 13:11:20.655591509 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmto10x.c.security-code netpbm-10.58.01/converter/pbm/pbmto10x.c
+--- netpbm-10.58.01/converter/pbm/pbmto10x.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmto10x.c	2012-04-09 15:40:03.197619863 +0200
 @@ -162,7 +162,7 @@ main(int argc, char * argv[]) {
          res_60x72();
  
@@ -426,9 +425,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmto10x.c.security-code netpbm-10.56.03/
  }
  
  
-diff -up netpbm-10.56.03/converter/pbm/pbmto4425.c.security-code netpbm-10.56.03/converter/pbm/pbmto4425.c
---- netpbm-10.56.03/converter/pbm/pbmto4425.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pbmto4425.c	2011-11-09 13:11:20.656591515 +0100
+diff -up netpbm-10.58.01/converter/pbm/pbmto4425.c.security-code netpbm-10.58.01/converter/pbm/pbmto4425.c
+--- netpbm-10.58.01/converter/pbm/pbmto4425.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pbmto4425.c	2012-04-09 15:40:03.198619851 +0200
 @@ -2,6 +2,7 @@
  
  #include "nstring.h"
@@ -446,9 +445,9 @@ diff -up netpbm-10.56.03/converter/pbm/pbmto4425.c.security-code netpbm-10.56.03
      if(vmap == NULL)
  	{
          pm_error( "Cannot allocate memory" );
-diff -up netpbm-10.56.03/converter/pbm/pktopbm.c.security-code netpbm-10.56.03/converter/pbm/pktopbm.c
---- netpbm-10.56.03/converter/pbm/pktopbm.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/pktopbm.c	2011-11-09 13:11:20.661591545 +0100
+diff -up netpbm-10.58.01/converter/pbm/pktopbm.c.security-code netpbm-10.58.01/converter/pbm/pktopbm.c
+--- netpbm-10.58.01/converter/pbm/pktopbm.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/pktopbm.c	2012-04-09 15:40:03.198619851 +0200
 @@ -277,6 +277,7 @@ main(int argc, char *argv[]) {
          if (flagbyte == 7) {            /* long form preamble */
              integer packetlength = get32() ;    /* character packet length */
@@ -457,9 +456,9 @@ diff -up netpbm-10.56.03/converter/pbm/pktopbm.c.security-code netpbm-10.56.03/c
              endofpacket = packetlength + pktopbm_pkloc;
                  /* calculate end of packet */
              if ((car >= MAXPKCHAR) || !filename[car]) {
-diff -up netpbm-10.56.03/converter/pbm/thinkjettopbm.l.security-code netpbm-10.56.03/converter/pbm/thinkjettopbm.l
---- netpbm-10.56.03/converter/pbm/thinkjettopbm.l.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/thinkjettopbm.l	2011-11-09 13:11:20.662591551 +0100
+diff -up netpbm-10.58.01/converter/pbm/thinkjettopbm.l.security-code netpbm-10.58.01/converter/pbm/thinkjettopbm.l
+--- netpbm-10.58.01/converter/pbm/thinkjettopbm.l.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/thinkjettopbm.l	2012-04-09 15:40:03.199619839 +0200
 @@ -114,7 +114,9 @@ DIG             [0-9]
  <RASTERMODE>\033\*b{DIG}+W  {
                              int l;
@@ -479,9 +478,9 @@ diff -up netpbm-10.56.03/converter/pbm/thinkjettopbm.l.security-code netpbm-10.5
      pbm_writepbminit(stdout, maxRowLength*8, rowCount, 0);
  
      packed_bitrow = malloc(maxRowLength);
-diff -up netpbm-10.56.03/converter/pbm/ybmtopbm.c.security-code netpbm-10.56.03/converter/pbm/ybmtopbm.c
---- netpbm-10.56.03/converter/pbm/ybmtopbm.c.security-code	2011-11-09 09:18:07.000000000 +0100
-+++ netpbm-10.56.03/converter/pbm/ybmtopbm.c	2011-11-09 13:37:27.308618676 +0100
+diff -up netpbm-10.58.01/converter/pbm/ybmtopbm.c.security-code netpbm-10.58.01/converter/pbm/ybmtopbm.c
+--- netpbm-10.58.01/converter/pbm/ybmtopbm.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/converter/pbm/ybmtopbm.c	2012-04-09 15:40:03.199619839 +0200
 @@ -49,6 +49,7 @@ getinit(FILE *  const ifP,
          pm_error("EOF / read error");
  
@@ -490,9 +489,9 @@ diff -up netpbm-10.56.03/converter/pbm/ybmtopbm.c.security-code netpbm-10.56.03/
      *padrightP = ((*colsP + 15) / 16) * 16 - *colsP;
  }
  
-diff -up netpbm-10.56.03/converter/pgm/lispmtopgm.c.security-code netpbm-10.56.03/converter/pgm/lispmtopgm.c
---- netpbm-10.56.03/converter/pgm/lispmtopgm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/pgm/lispmtopgm.c	2011-11-09 13:11:20.663591557 +0100
+diff -up netpbm-10.58.01/converter/pgm/lispmtopgm.c.security-code netpbm-10.58.01/converter/pgm/lispmtopgm.c
+--- netpbm-10.58.01/converter/pgm/lispmtopgm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/pgm/lispmtopgm.c	2012-04-09 15:40:03.199619839 +0200
 @@ -58,6 +58,7 @@ main( argc, argv )
          pm_error( "depth (%d bits) is too large", depth);
  
@@ -512,9 +511,9 @@ diff -up netpbm-10.56.03/converter/pgm/lispmtopgm.c.security-code netpbm-10.56.0
      *padrightP = ( ( *colsP + 31 ) / 32 ) * 32 - *colsP;
      
      if ( *colsP != (cols_32 - *padrightP) ) {
-diff -up netpbm-10.56.03/converter/pgm/psidtopgm.c.security-code netpbm-10.56.03/converter/pgm/psidtopgm.c
---- netpbm-10.56.03/converter/pgm/psidtopgm.c.security-code	2011-11-09 09:18:00.000000000 +0100
-+++ netpbm-10.56.03/converter/pgm/psidtopgm.c	2011-11-09 13:11:20.663591557 +0100
+diff -up netpbm-10.58.01/converter/pgm/psidtopgm.c.security-code netpbm-10.58.01/converter/pgm/psidtopgm.c
+--- netpbm-10.58.01/converter/pgm/psidtopgm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/pgm/psidtopgm.c	2012-04-09 15:40:03.200619827 +0200
 @@ -78,6 +78,7 @@ main(int     argc,
          pm_error("bits/sample (%d) is too large.", bitspersample);
  
@@ -523,9 +522,9 @@ diff -up netpbm-10.56.03/converter/pgm/psidtopgm.c.security-code netpbm-10.56.03
      grayrow = pgm_allocrow((cols + 7) / 8 * 8);
      for (row = 0; row < rows; ++row) {
          unsigned int col;
-diff -up netpbm-10.56.03/converter/ppm/ilbmtoppm.c.security-code netpbm-10.56.03/converter/ppm/ilbmtoppm.c
---- netpbm-10.56.03/converter/ppm/ilbmtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ilbmtoppm.c	2011-11-09 13:11:20.664591563 +0100
+diff -up netpbm-10.58.01/converter/ppm/ilbmtoppm.c.security-code netpbm-10.58.01/converter/ppm/ilbmtoppm.c
+--- netpbm-10.58.01/converter/ppm/ilbmtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ilbmtoppm.c	2012-04-09 15:40:03.201619815 +0200
 @@ -592,6 +592,7 @@ decode_row(FILE *          const ifP,
      rawtype *chp;
  
@@ -596,9 +595,9 @@ diff -up netpbm-10.56.03/converter/ppm/ilbmtoppm.c.security-code netpbm-10.56.03
          MALLOCARRAY_NOFAIL(ilbmrow, RowBytes(bmhdP->w));
          *viewportmodesP |= fakeviewport;      /* -isham/-isehb */
  
-diff -up netpbm-10.56.03/converter/ppm/imgtoppm.c.security-code netpbm-10.56.03/converter/ppm/imgtoppm.c
---- netpbm-10.56.03/converter/ppm/imgtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/imgtoppm.c	2011-11-09 13:11:20.665591569 +0100
+diff -up netpbm-10.58.01/converter/ppm/imgtoppm.c.security-code netpbm-10.58.01/converter/ppm/imgtoppm.c
+--- netpbm-10.58.01/converter/ppm/imgtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/imgtoppm.c	2012-04-09 15:40:03.202619802 +0200
 @@ -84,6 +84,7 @@ main(int argc, char ** argv) {
              len = atoi((char*) buf );
              if ( fread( buf, len, 1, ifp ) != 1 )
@@ -615,9 +614,9 @@ diff -up netpbm-10.56.03/converter/ppm/imgtoppm.c.security-code netpbm-10.56.03/
              if ( len != cols * rows )
                  pm_message(
                      "pixel data length (%d) does not match image size (%d)",
-diff -up netpbm-10.56.03/converter/ppm/Makefile.security-code netpbm-10.56.03/converter/ppm/Makefile
---- netpbm-10.56.03/converter/ppm/Makefile.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/Makefile	2011-11-09 14:33:40.386198300 +0100
+diff -up netpbm-10.58.01/converter/ppm/Makefile.security-code netpbm-10.58.01/converter/ppm/Makefile
+--- netpbm-10.58.01/converter/ppm/Makefile.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/Makefile	2012-04-09 15:40:03.202619802 +0200
 @@ -11,7 +11,7 @@ SUBDIRS = hpcdtoppm ppmtompeg
  
  PORTBINARIES =	411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \
@@ -627,9 +626,9 @@ diff -up netpbm-10.56.03/converter/ppm/Makefile.security-code netpbm-10.56.03/co
  		ppmtoacad ppmtoapplevol ppmtoarbtxt ppmtoascii \
  		ppmtobmp ppmtoeyuv ppmtogif ppmtoicr ppmtoilbm \
  		ppmtoleaf ppmtolj ppmtomitsu ppmtoneo \
-diff -up netpbm-10.56.03/converter/ppm/pcxtoppm.c.security-code netpbm-10.56.03/converter/ppm/pcxtoppm.c
---- netpbm-10.56.03/converter/ppm/pcxtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/pcxtoppm.c	2011-11-09 13:11:20.666591575 +0100
+diff -up netpbm-10.58.01/converter/ppm/pcxtoppm.c.security-code netpbm-10.58.01/converter/ppm/pcxtoppm.c
+--- netpbm-10.58.01/converter/ppm/pcxtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/pcxtoppm.c	2012-04-09 15:40:03.203619789 +0200
 @@ -409,6 +409,7 @@ pcx_planes_to_pixels(pixels, bitplanes,
      /*
       * clear the pixel buffer
@@ -646,18 +645,18 @@ diff -up netpbm-10.56.03/converter/ppm/pcxtoppm.c.security-code netpbm-10.56.03/
      rawcols = BytesPerLine * 8 / BitsPerPixel;
      if (headerCols > rawcols) {
          pm_message("warning - BytesPerLine = %d, "
-diff -up netpbm-10.56.03/converter/ppm/picttoppm.c.security-code netpbm-10.56.03/converter/ppm/picttoppm.c
---- netpbm-10.56.03/converter/ppm/picttoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/picttoppm.c	2011-11-09 13:11:20.668591585 +0100
+diff -up netpbm-10.58.01/converter/ppm/picttoppm.c.security-code netpbm-10.58.01/converter/ppm/picttoppm.c
+--- netpbm-10.58.01/converter/ppm/picttoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/picttoppm.c	2012-04-09 15:40:03.205619763 +0200
 @@ -1,3 +1,5 @@
 +#error "Unfixable. Don't ship me"
 +
  /*
   * picttoppm.c -- convert a MacIntosh PICT file to PPM format.
   *
-diff -up netpbm-10.56.03/converter/ppm/pjtoppm.c.security-code netpbm-10.56.03/converter/ppm/pjtoppm.c
---- netpbm-10.56.03/converter/ppm/pjtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/pjtoppm.c	2011-11-09 13:11:20.669591591 +0100
+diff -up netpbm-10.58.01/converter/ppm/pjtoppm.c.security-code netpbm-10.58.01/converter/ppm/pjtoppm.c
+--- netpbm-10.58.01/converter/ppm/pjtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/pjtoppm.c	2012-04-09 15:40:03.206619751 +0200
 @@ -127,19 +127,21 @@ main(argc, argv)
                  case 'V':   /* send plane */
                  case 'W':   /* send last plane */
@@ -707,9 +706,9 @@ diff -up netpbm-10.56.03/converter/ppm/pjtoppm.c.security-code netpbm-10.56.03/c
          cols *= 8;
      }
              
-diff -up netpbm-10.56.03/converter/ppm/ppmtoeyuv.c.security-code netpbm-10.56.03/converter/ppm/ppmtoeyuv.c
---- netpbm-10.56.03/converter/ppm/ppmtoeyuv.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtoeyuv.c	2011-11-09 13:11:20.670591597 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtoeyuv.c.security-code netpbm-10.58.01/converter/ppm/ppmtoeyuv.c
+--- netpbm-10.58.01/converter/ppm/ppmtoeyuv.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtoeyuv.c	2012-04-09 15:40:03.206619751 +0200
 @@ -114,6 +114,7 @@ create_multiplication_tables(const pixva
  
      int index;
@@ -718,9 +717,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtoeyuv.c.security-code netpbm-10.56.03
      MALLOCARRAY_NOFAIL(mult299   , maxval+1);
      MALLOCARRAY_NOFAIL(mult587   , maxval+1);
      MALLOCARRAY_NOFAIL(mult114   , maxval+1);
-diff -up netpbm-10.56.03/converter/ppm/ppmtoicr.c.security-code netpbm-10.56.03/converter/ppm/ppmtoicr.c
---- netpbm-10.56.03/converter/ppm/ppmtoicr.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtoicr.c	2011-11-09 13:11:20.670591597 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtoicr.c.security-code netpbm-10.58.01/converter/ppm/ppmtoicr.c
+--- netpbm-10.58.01/converter/ppm/ppmtoicr.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtoicr.c	2012-04-09 15:40:03.207619739 +0200
 @@ -169,7 +169,7 @@ char* argv[];
  
  	if (rleflag) {	
@@ -730,9 +729,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtoicr.c.security-code netpbm-10.56.03/
  		p = testimage;
  		for (i=0; i<rows; i++)
  			for (j=0; j<cols; j++) 
-diff -up netpbm-10.56.03/converter/ppm/ppmtoilbm.c.security-code netpbm-10.56.03/converter/ppm/ppmtoilbm.c
---- netpbm-10.56.03/converter/ppm/ppmtoilbm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtoilbm.c	2011-11-09 13:11:20.672591609 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtoilbm.c.security-code netpbm-10.58.01/converter/ppm/ppmtoilbm.c
+--- netpbm-10.58.01/converter/ppm/ppmtoilbm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtoilbm.c	2012-04-09 15:40:03.208619727 +0200
 @@ -1220,6 +1220,7 @@ ppm_to_rgb8(ifP, cols, rows, maxval)
  
      maskmethod = 0;     /* no masking - RGB8 uses genlock bits */
@@ -770,9 +769,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtoilbm.c.security-code netpbm-10.56.03
      }
      
      switch (mode) {
-diff -up netpbm-10.56.03/converter/ppm/ppmtolj.c.security-code netpbm-10.56.03/converter/ppm/ppmtolj.c
---- netpbm-10.56.03/converter/ppm/ppmtolj.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtolj.c	2011-11-09 13:11:20.674591621 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtolj.c.security-code netpbm-10.58.01/converter/ppm/ppmtolj.c
+--- netpbm-10.58.01/converter/ppm/ppmtolj.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtolj.c	2012-04-09 15:40:03.210619701 +0200
 @@ -181,7 +181,8 @@ int main(int argc, char *argv[]) {
  
      ppm_readppminit( ifp, &cols, &rows, &maxval, &format );
@@ -783,9 +782,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtolj.c.security-code netpbm-10.56.03/c
      obuf = (unsigned char *) pm_allocrow(cols * 3, sizeof(unsigned char));
      cbuf = (unsigned char *) pm_allocrow(cols * 6, sizeof(unsigned char));
      if (mode == C_TRANS_MODE_DELTA)
-diff -up netpbm-10.56.03/converter/ppm/ppmtomitsu.c.security-code netpbm-10.56.03/converter/ppm/ppmtomitsu.c
---- netpbm-10.56.03/converter/ppm/ppmtomitsu.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtomitsu.c	2011-11-09 13:11:20.674591621 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtomitsu.c.security-code netpbm-10.58.01/converter/ppm/ppmtomitsu.c
+--- netpbm-10.58.01/converter/ppm/ppmtomitsu.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtomitsu.c	2012-04-09 15:40:03.210619702 +0200
 @@ -685,6 +685,8 @@ main(int argc, char * argv[]) {
          medias = MSize_User;
  
@@ -795,9 +794,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtomitsu.c.security-code netpbm-10.56.0
          medias.maxcols *= 2;
          medias.maxrows *= 2;
      }
-diff -up netpbm-10.56.03/converter/ppm/ppmtopcx.c.security-code netpbm-10.56.03/converter/ppm/ppmtopcx.c
---- netpbm-10.56.03/converter/ppm/ppmtopcx.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtopcx.c	2011-11-09 13:11:20.675591627 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtopcx.c.security-code netpbm-10.58.01/converter/ppm/ppmtopcx.c
+--- netpbm-10.58.01/converter/ppm/ppmtopcx.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtopcx.c	2012-04-09 15:40:03.210619702 +0200
 @@ -419,6 +419,8 @@ ppmTo16ColorPcx(pixel **            cons
              else                   Planes = 1;
          }
@@ -807,9 +806,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtopcx.c.security-code netpbm-10.56.03/
      BytesPerLine = ((cols * BitsPerPixel) + 7) / 8;
      MALLOCARRAY_NOFAIL(indexRow, cols);
      MALLOCARRAY_NOFAIL(planesrow, BytesPerLine);
-diff -up netpbm-10.56.03/converter/ppm/ppmtopict.c.security-code netpbm-10.56.03/converter/ppm/ppmtopict.c
---- netpbm-10.56.03/converter/ppm/ppmtopict.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtopict.c	2011-11-09 14:36:09.280529445 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtopict.c.security-code netpbm-10.58.01/converter/ppm/ppmtopict.c
+--- netpbm-10.58.01/converter/ppm/ppmtopict.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtopict.c	2012-04-09 15:40:03.211619690 +0200
 @@ -441,6 +441,8 @@ main(int argc, const char ** argv) {
      putShort(stdout, 0);            /* mode */
  
@@ -819,9 +818,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtopict.c.security-code netpbm-10.56.03
      packed = malloc((unsigned)(cols+cols/MAX_COUNT+1));
      for (row = 0, oc = 0; row < rows; row++)
          oc += putRow(stdout, row, cols, pixels[row], packed);
-diff -up netpbm-10.56.03/converter/ppm/ppmtopj.c.security-code netpbm-10.56.03/converter/ppm/ppmtopj.c
---- netpbm-10.56.03/converter/ppm/ppmtopj.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtopj.c	2011-11-09 13:11:20.676591633 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtopj.c.security-code netpbm-10.58.01/converter/ppm/ppmtopj.c
+--- netpbm-10.58.01/converter/ppm/ppmtopj.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtopj.c	2012-04-09 15:40:03.212619677 +0200
 @@ -179,6 +179,7 @@ char *argv[];
  	pixels = ppm_readppm( ifp, &cols, &rows, &maxval );
  
@@ -830,9 +829,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtopj.c.security-code netpbm-10.56.03/c
  	obuf = (unsigned char *) pm_allocrow(cols, sizeof(unsigned char));
  	cbuf = (unsigned char *) pm_allocrow(cols * 2, sizeof(unsigned char));
  
-diff -up netpbm-10.56.03/converter/ppm/ppmtopjxl.c.security-code netpbm-10.56.03/converter/ppm/ppmtopjxl.c
---- netpbm-10.56.03/converter/ppm/ppmtopjxl.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtopjxl.c	2011-11-09 13:11:20.677591639 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtopjxl.c.security-code netpbm-10.58.01/converter/ppm/ppmtopjxl.c
+--- netpbm-10.58.01/converter/ppm/ppmtopjxl.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtopjxl.c	2012-04-09 15:40:03.212619677 +0200
 @@ -276,6 +276,8 @@ main(int argc, const char * argv[]) {
          pm_error("image too large; reduce with ppmscale");
      if (maxval > PCL_MAXVAL)
@@ -865,9 +864,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtopjxl.c.security-code netpbm-10.56.03
      inrow = (char *)malloc((unsigned)bpp);
      outrow = (char *)malloc((unsigned)bpp*2);
      runcnt = (signed char *)malloc((unsigned)bpp);
-diff -up netpbm-10.56.03/converter/ppm/ppmtowinicon.c.security-code netpbm-10.56.03/converter/ppm/ppmtowinicon.c
---- netpbm-10.56.03/converter/ppm/ppmtowinicon.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtowinicon.c	2011-11-09 13:11:20.678591645 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtowinicon.c.security-code netpbm-10.58.01/converter/ppm/ppmtowinicon.c
+--- netpbm-10.58.01/converter/ppm/ppmtowinicon.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtowinicon.c	2012-04-09 15:40:03.213619664 +0200
 @@ -12,6 +12,7 @@
  
  #include <math.h>
@@ -911,9 +910,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtowinicon.c.security-code netpbm-10.56
      entry->size_in_bytes = 
          xorBitmap->size + andBitmap->size + 40 + (4 * entry->color_count);
      if (verbose) 
-diff -up netpbm-10.56.03/converter/ppm/ppmtoxpm.c.security-code netpbm-10.56.03/converter/ppm/ppmtoxpm.c
---- netpbm-10.56.03/converter/ppm/ppmtoxpm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ppmtoxpm.c	2011-11-09 13:11:20.679591651 +0100
+diff -up netpbm-10.58.01/converter/ppm/ppmtoxpm.c.security-code netpbm-10.58.01/converter/ppm/ppmtoxpm.c
+--- netpbm-10.58.01/converter/ppm/ppmtoxpm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ppmtoxpm.c	2012-04-09 15:40:03.214619651 +0200
 @@ -197,6 +197,7 @@ genNumstr(unsigned int const input, int
      unsigned int i;
  
@@ -930,9 +929,9 @@ diff -up netpbm-10.56.03/converter/ppm/ppmtoxpm.c.security-code netpbm-10.56.03/
      MALLOCARRAY(cmap, cmapSize);
      if (cmapP == NULL)
          pm_error("Out of memory allocating %u bytes for a color map.",
-diff -up netpbm-10.56.03/converter/ppm/qrttoppm.c.security-code netpbm-10.56.03/converter/ppm/qrttoppm.c
---- netpbm-10.56.03/converter/ppm/qrttoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/qrttoppm.c	2011-11-09 13:11:20.679591651 +0100
+diff -up netpbm-10.58.01/converter/ppm/qrttoppm.c.security-code netpbm-10.58.01/converter/ppm/qrttoppm.c
+--- netpbm-10.58.01/converter/ppm/qrttoppm.c.security-code	2012-04-09 15:31:42.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/qrttoppm.c	2012-04-09 15:40:03.215619638 +0200
 @@ -46,7 +46,7 @@ main( argc, argv )
  
      ppm_writeppminit( stdout, cols, rows, maxval, 0 );
@@ -942,9 +941,9 @@ diff -up netpbm-10.56.03/converter/ppm/qrttoppm.c.security-code netpbm-10.56.03/
      if ( buf == (unsigned char *) 0 )
  	pm_error( "out of memory" );
  
-diff -up netpbm-10.56.03/converter/ppm/sldtoppm.c.security-code netpbm-10.56.03/converter/ppm/sldtoppm.c
---- netpbm-10.56.03/converter/ppm/sldtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/sldtoppm.c	2011-11-09 13:11:20.680591657 +0100
+diff -up netpbm-10.58.01/converter/ppm/sldtoppm.c.security-code netpbm-10.58.01/converter/ppm/sldtoppm.c
+--- netpbm-10.58.01/converter/ppm/sldtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/sldtoppm.c	2012-04-09 15:40:03.216619626 +0200
 @@ -455,6 +455,8 @@ slider(slvecfn   slvec,
      
      /* Allocate image buffer and clear it to black. */
@@ -954,9 +953,9 @@ diff -up netpbm-10.56.03/converter/ppm/sldtoppm.c.security-code netpbm-10.56.03/
      pixels = ppm_allocarray(pixcols = ixdots + 1, pixrows = iydots + 1);
      PPM_ASSIGN(rgbcolor, 0, 0, 0);
      ppmd_filledrectangle(pixels, pixcols, pixrows, pixmaxval, 0, 0,
-diff -up netpbm-10.56.03/converter/ppm/ximtoppm.c.security-code netpbm-10.56.03/converter/ppm/ximtoppm.c
---- netpbm-10.56.03/converter/ppm/ximtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/ximtoppm.c	2011-11-09 13:11:20.681591662 +0100
+diff -up netpbm-10.58.01/converter/ppm/ximtoppm.c.security-code netpbm-10.58.01/converter/ppm/ximtoppm.c
+--- netpbm-10.58.01/converter/ppm/ximtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/ximtoppm.c	2012-04-09 15:40:03.216619626 +0200
 @@ -117,6 +117,7 @@ ReadXimHeader(FILE *     const in_fp,
      header->bits_channel = atoi(a_head.bits_per_channel);
      header->alpha_flag = atoi(a_head.alpha_channel);
@@ -989,20 +988,20 @@ diff -up netpbm-10.56.03/converter/ppm/ximtoppm.c.security-code netpbm-10.56.03/
          header->colors = (Color *)calloc((unsigned int)header->ncolors,
                  sizeof(Color));
          if (header->colors == NULL) {
-diff -up netpbm-10.56.03/converter/ppm/xpmtoppm.c.security-code netpbm-10.56.03/converter/ppm/xpmtoppm.c
---- netpbm-10.56.03/converter/ppm/xpmtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/xpmtoppm.c	2011-11-09 13:11:20.682591667 +0100
-@@ -759,6 +759,7 @@ ReadXPMFile(FILE * const stream, int * c
-                        &ncolors, colorsP, &ptab);
-         *transparentP = -1;  /* No transparency in version 1 */
+diff -up netpbm-10.58.01/converter/ppm/xpmtoppm.c.security-code netpbm-10.58.01/converter/ppm/xpmtoppm.c
+--- netpbm-10.58.01/converter/ppm/xpmtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/xpmtoppm.c	2012-04-09 15:41:54.193232227 +0200
+@@ -851,6 +851,7 @@ readXpmFile(FILE *             const ifP
+                        &nColors, colorsP, &ptab);
+         transparentP->none = true;  /* No transparency in version 1 */
      }
 +    overflow2(*widthP, *heightP);
-     totalpixels = *widthP * *heightP;
-     MALLOCARRAY(*dataP, totalpixels);
-     if (*dataP == NULL)
-diff -up netpbm-10.56.03/converter/ppm/yuvtoppm.c.security-code netpbm-10.56.03/converter/ppm/yuvtoppm.c
---- netpbm-10.56.03/converter/ppm/yuvtoppm.c.security-code	2011-11-09 09:18:06.000000000 +0100
-+++ netpbm-10.56.03/converter/ppm/yuvtoppm.c	2011-11-09 13:11:20.682591667 +0100
+     totalpixels = width * height;
+     MALLOCARRAY(data, totalpixels);
+     if (!data)
+diff -up netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code netpbm-10.58.01/converter/ppm/yuvtoppm.c
+--- netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
++++ netpbm-10.58.01/converter/ppm/yuvtoppm.c	2012-04-09 15:40:03.218619602 +0200
 @@ -72,6 +72,7 @@ main(argc, argv)
  
  	ppm_writeppminit(stdout, cols, rows, (pixval) 255, 0);
@@ -1011,9 +1010,9 @@ diff -up netpbm-10.56.03/converter/ppm/yuvtoppm.c.security-code netpbm-10.56.03/
      MALLOCARRAY(yuvbuf, (cols+1)/2);
      if (yuvbuf == NULL)
          pm_error("Unable to allocate YUV buffer for %d columns.", cols);
-diff -up netpbm-10.56.03/editor/pamcut.c.security-code netpbm-10.56.03/editor/pamcut.c
---- netpbm-10.56.03/editor/pamcut.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pamcut.c	2011-11-09 13:11:20.683591673 +0100
+diff -up netpbm-10.58.01/editor/pamcut.c.security-code netpbm-10.58.01/editor/pamcut.c
+--- netpbm-10.58.01/editor/pamcut.c.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/pamcut.c	2012-04-09 15:40:03.218619602 +0200
 @@ -655,6 +655,8 @@ cutOneImage(FILE *             const ifP
  
      outpam = inpam;    /* Initial value -- most fields should be same */
@@ -1023,10 +1022,9 @@ diff -up netpbm-10.56.03/editor/pamcut.c.security-code netpbm-10.56.03/editor/pa
      outpam.width  = rightcol - leftcol + 1;
      outpam.height = bottomrow - toprow + 1;
  
-diff -up netpbm-10.56.03/editor/pbmpscale.c.security-code netpbm-10.56.03/editor/pbmpscale.c
-diff -up netpbm-10.56.03/editor/pbmreduce.c.security-code netpbm-10.56.03/editor/pbmreduce.c
---- netpbm-10.56.03/editor/pbmreduce.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pbmreduce.c	2011-11-09 13:11:20.685591685 +0100
+diff -up netpbm-10.58.01/editor/pbmreduce.c.security-code netpbm-10.58.01/editor/pbmreduce.c
+--- netpbm-10.58.01/editor/pbmreduce.c.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/pbmreduce.c	2012-04-09 15:40:03.219619590 +0200
 @@ -94,6 +94,7 @@ main( argc, argv )
      if (halftone == QT_FS) {
          unsigned int col;
@@ -1035,9 +1033,9 @@ diff -up netpbm-10.56.03/editor/pbmreduce.c.security-code netpbm-10.56.03/editor
          MALLOCARRAY(thiserr, newcols + 2);
          MALLOCARRAY(nexterr, newcols + 2);
          if (thiserr == NULL || nexterr == NULL)
-diff -up netpbm-10.56.03/editor/pnmgamma.c.security-code netpbm-10.56.03/editor/pnmgamma.c
---- netpbm-10.56.03/editor/pnmgamma.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pnmgamma.c	2011-11-09 13:11:20.685591685 +0100
+diff -up netpbm-10.58.01/editor/pnmgamma.c.security-code netpbm-10.58.01/editor/pnmgamma.c
+--- netpbm-10.58.01/editor/pnmgamma.c.security-code	2012-04-09 15:31:34.000000000 +0200
++++ netpbm-10.58.01/editor/pnmgamma.c	2012-04-09 15:40:03.220619577 +0200
 @@ -586,6 +586,7 @@ createGammaTables(enum transferFunction
                    xelval **             const btableP) {
  
@@ -1046,9 +1044,9 @@ diff -up netpbm-10.56.03/editor/pnmgamma.c.security-code netpbm-10.56.03/editor/
      MALLOCARRAY(*rtableP, maxval+1);
      MALLOCARRAY(*gtableP, maxval+1);
      MALLOCARRAY(*btableP, maxval+1);
-diff -up netpbm-10.56.03/editor/pnmhisteq.c.security-code netpbm-10.56.03/editor/pnmhisteq.c
---- netpbm-10.56.03/editor/pnmhisteq.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pnmhisteq.c	2011-11-09 13:11:20.686591691 +0100
+diff -up netpbm-10.58.01/editor/pnmhisteq.c.security-code netpbm-10.58.01/editor/pnmhisteq.c
+--- netpbm-10.58.01/editor/pnmhisteq.c.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/pnmhisteq.c	2012-04-09 15:40:03.220619577 +0200
 @@ -103,6 +103,7 @@ computeLuminosityHistogram(xel * const *
      unsigned int pixelCount;
      unsigned int * lumahist;
@@ -1057,9 +1055,9 @@ diff -up netpbm-10.56.03/editor/pnmhisteq.c.security-code netpbm-10.56.03/editor
      MALLOCARRAY(lumahist, maxval + 1);
      if (lumahist == NULL)
          pm_error("Out of storage allocating array for %u histogram elements",
-diff -up netpbm-10.56.03/editor/pnmindex.csh.security-code netpbm-10.56.03/editor/pnmindex.csh
---- netpbm-10.56.03/editor/pnmindex.csh.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pnmindex.csh	2011-11-09 13:11:20.686591691 +0100
+diff -up netpbm-10.58.01/editor/pnmindex.csh.security-code netpbm-10.58.01/editor/pnmindex.csh
+--- netpbm-10.58.01/editor/pnmindex.csh.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/pnmindex.csh	2012-04-09 15:40:03.221619564 +0200
 @@ -1,5 +1,8 @@
  #!/bin/csh -f
  #
@@ -1069,9 +1067,9 @@ diff -up netpbm-10.56.03/editor/pnmindex.csh.security-code netpbm-10.56.03/edito
  # pnmindex - build a visual index of a bunch of anymaps
  #
  # Copyright (C) 1991 by Jef Poskanzer.
-diff -up netpbm-10.56.03/editor/pnmpad.c.security-code netpbm-10.56.03/editor/pnmpad.c
---- netpbm-10.56.03/editor/pnmpad.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pnmpad.c	2011-11-09 13:11:20.687591697 +0100
+diff -up netpbm-10.58.01/editor/pnmpad.c.security-code netpbm-10.58.01/editor/pnmpad.c
+--- netpbm-10.58.01/editor/pnmpad.c.security-code	2012-04-09 15:31:34.000000000 +0200
++++ netpbm-10.58.01/editor/pnmpad.c	2012-04-09 15:40:03.221619564 +0200
 @@ -527,6 +527,8 @@ main(int argc, const char ** argv) {
  
      computePadSizes(cmdline, cols, rows, &lpad, &rpad, &tpad, &bpad);
@@ -1081,9 +1079,9 @@ diff -up netpbm-10.56.03/editor/pnmpad.c.security-code netpbm-10.56.03/editor/pn
      newcols = cols + lpad + rpad;
  
      if (PNM_FORMAT_TYPE(format) == PBM_TYPE)
-diff -up netpbm-10.56.03/editor/pnmremap.c.security-code netpbm-10.56.03/editor/pnmremap.c
---- netpbm-10.56.03/editor/pnmremap.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pnmremap.c	2011-11-09 13:11:20.688591703 +0100
+diff -up netpbm-10.58.01/editor/pnmremap.c.security-code netpbm-10.58.01/editor/pnmremap.c
+--- netpbm-10.58.01/editor/pnmremap.c.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/pnmremap.c	2012-04-09 15:40:03.222619551 +0200
 @@ -409,7 +409,7 @@ initFserr(struct pam *   const pamP,
      unsigned int plane;
  
@@ -1101,9 +1099,9 @@ diff -up netpbm-10.56.03/editor/pnmremap.c.security-code netpbm-10.56.03/editor/
      for (col = 0; col < pamP->width + 2; ++col) {
          unsigned int plane;
          for (plane = 0; plane < pamP->depth; ++plane) 
-diff -up netpbm-10.56.03/editor/pnmscalefixed.c.security-code netpbm-10.56.03/editor/pnmscalefixed.c
---- netpbm-10.56.03/editor/pnmscalefixed.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pnmscalefixed.c	2011-11-09 13:11:20.689591709 +0100
+diff -up netpbm-10.58.01/editor/pnmscalefixed.c.security-code netpbm-10.58.01/editor/pnmscalefixed.c
+--- netpbm-10.58.01/editor/pnmscalefixed.c.security-code	2012-04-09 15:31:34.000000000 +0200
++++ netpbm-10.58.01/editor/pnmscalefixed.c	2012-04-09 15:40:03.223619538 +0200
 @@ -214,6 +214,8 @@ compute_output_dimensions(const struct c
                            const int rows, const int cols,
                            int * newrowsP, int * newcolsP) {
@@ -1132,9 +1130,9 @@ diff -up netpbm-10.56.03/editor/pnmscalefixed.c.security-code netpbm-10.56.03/ed
      sxscale = SCALE * newcols / cols;
      syscale = SCALE * newrows / rows;
  
-diff -up netpbm-10.56.03/editor/pnmshear.c.security-code netpbm-10.56.03/editor/pnmshear.c
---- netpbm-10.56.03/editor/pnmshear.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/pnmshear.c	2011-11-09 13:11:20.689591709 +0100
+diff -up netpbm-10.58.01/editor/pnmshear.c.security-code netpbm-10.58.01/editor/pnmshear.c
+--- netpbm-10.58.01/editor/pnmshear.c.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/pnmshear.c	2012-04-09 15:40:03.224619526 +0200
 @@ -15,6 +15,7 @@
  #include <assert.h>
  #include <math.h>
@@ -1155,9 +1153,9 @@ diff -up netpbm-10.56.03/editor/pnmshear.c.security-code netpbm-10.56.03/editor/
      newcols = rows * shearfac + cols + 0.999999;
  
      pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0);
-diff -up netpbm-10.56.03/editor/ppmdither.c.security-code netpbm-10.56.03/editor/ppmdither.c
---- netpbm-10.56.03/editor/ppmdither.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/ppmdither.c	2011-11-09 13:28:52.043380984 +0100
+diff -up netpbm-10.58.01/editor/ppmdither.c.security-code netpbm-10.58.01/editor/ppmdither.c
+--- netpbm-10.58.01/editor/ppmdither.c.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/ppmdither.c	2012-04-09 15:40:03.224619526 +0200
 @@ -355,7 +355,11 @@ dithMatrix(unsigned int const dithPower)
          unsigned int const dithMatSize = 
              (dithDim * sizeof(*dithMat)) + /* pointers */
@@ -1171,9 +1169,9 @@ diff -up netpbm-10.56.03/editor/ppmdither.c.security-code netpbm-10.56.03/editor
          dithMat = malloc(dithMatSize);
          
          if (dithMat == NULL) 
-diff -up netpbm-10.56.03/editor/specialty/pamoil.c.security-code netpbm-10.56.03/editor/specialty/pamoil.c
---- netpbm-10.56.03/editor/specialty/pamoil.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/editor/specialty/pamoil.c	2011-11-09 13:11:20.690591715 +0100
+diff -up netpbm-10.58.01/editor/specialty/pamoil.c.security-code netpbm-10.58.01/editor/specialty/pamoil.c
+--- netpbm-10.58.01/editor/specialty/pamoil.c.security-code	2012-04-09 15:31:33.000000000 +0200
++++ netpbm-10.58.01/editor/specialty/pamoil.c	2012-04-09 15:40:03.224619526 +0200
 @@ -112,6 +112,7 @@ main(int argc, char *argv[] ) {
      tuples = pnm_readpam(ifp, &inpam, PAM_STRUCT_SIZE(tuple_type));
      pm_close(ifp);
@@ -1182,10 +1180,9 @@ diff -up netpbm-10.56.03/editor/specialty/pamoil.c.security-code netpbm-10.56.03
      MALLOCARRAY(hist, inpam.maxval + 1);
      if (hist == NULL)
          pm_error("Unable to allocate memory for histogram.");
-diff -up netpbm-10.56.03/generator/pbmpage.c.security-code netpbm-10.56.03/generator/pbmpage.c
-diff -up netpbm-10.56.03/generator/pbmtext.c.security-code netpbm-10.56.03/generator/pbmtext.c
---- netpbm-10.56.03/generator/pbmtext.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/generator/pbmtext.c	2011-11-09 13:18:31.716118581 +0100
+diff -up netpbm-10.58.01/generator/pbmtext.c.security-code netpbm-10.58.01/generator/pbmtext.c
+--- netpbm-10.58.01/generator/pbmtext.c.security-code	2012-04-09 15:31:34.000000000 +0200
++++ netpbm-10.58.01/generator/pbmtext.c	2012-04-09 15:40:03.225619514 +0200
 @@ -96,12 +96,14 @@ parseCommandLine(int argc, const char **
          
          for (i = 1; i < argc; ++i) {
@@ -1217,9 +1214,9 @@ diff -up netpbm-10.56.03/generator/pbmtext.c.security-code netpbm-10.56.03/gener
              hmargin = 2 * fontP->maxwidth;
          }
      }
-diff -up netpbm-10.56.03/generator/pgmcrater.c.security-code netpbm-10.56.03/generator/pgmcrater.c
---- netpbm-10.56.03/generator/pgmcrater.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/generator/pgmcrater.c	2011-11-09 13:11:20.692591727 +0100
+diff -up netpbm-10.58.01/generator/pgmcrater.c.security-code netpbm-10.58.01/generator/pgmcrater.c
+--- netpbm-10.58.01/generator/pgmcrater.c.security-code	2012-04-09 15:31:34.000000000 +0200
++++ netpbm-10.58.01/generator/pgmcrater.c	2012-04-09 15:40:03.226619502 +0200
 @@ -130,7 +130,7 @@ static void gencraters()
      /* Acquire the elevation array and initialize it to mean
         surface elevation. */
@@ -1229,9 +1226,9 @@ diff -up netpbm-10.56.03/generator/pgmcrater.c.security-code netpbm-10.56.03/gen
      if (aux == NULL) 
          pm_error("out of memory allocating elevation array");
  
-diff -up netpbm-10.56.03/generator/pgmkernel.c.security-code netpbm-10.56.03/generator/pgmkernel.c
---- netpbm-10.56.03/generator/pgmkernel.c.security-code	2011-11-09 09:17:50.000000000 +0100
-+++ netpbm-10.56.03/generator/pgmkernel.c	2011-11-09 13:11:20.692591727 +0100
+diff -up netpbm-10.58.01/generator/pgmkernel.c.security-code netpbm-10.58.01/generator/pgmkernel.c
+--- netpbm-10.58.01/generator/pgmkernel.c.security-code	2012-04-09 15:31:34.000000000 +0200
++++ netpbm-10.58.01/generator/pgmkernel.c	2012-04-09 15:40:03.226619502 +0200
 @@ -68,7 +68,7 @@ main ( argc, argv )
      kycenter = (fysize - 1) / 2.0;
      ixsize = fxsize + 0.999;
@@ -1241,9 +1238,9 @@ diff -up netpbm-10.56.03/generator/pgmkernel.c.security-code netpbm-10.56.03/gen
      for (i = 0; i < iysize; i++) 
          for (j = 0; j < ixsize; j++) {
              fkernel[i*ixsize+j] = 1.0 / (1.0 + w * sqrt((double)
-diff -up netpbm-10.56.03/lib/libpam.c.security-code netpbm-10.56.03/lib/libpam.c
---- netpbm-10.56.03/lib/libpam.c.security-code	2011-11-09 09:17:53.000000000 +0100
-+++ netpbm-10.56.03/lib/libpam.c	2011-11-09 13:36:03.778913243 +0100
+diff -up netpbm-10.58.01/lib/libpam.c.security-code netpbm-10.58.01/lib/libpam.c
+--- netpbm-10.58.01/lib/libpam.c.security-code	2012-04-09 15:31:38.000000000 +0200
++++ netpbm-10.58.01/lib/libpam.c	2012-04-09 15:40:03.227619490 +0200
 @@ -220,7 +220,8 @@ allocPamRow(const struct pam * const pam
      unsigned int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample);
      tuple * tuplerow;
@@ -1254,9 +1251,9 @@ diff -up netpbm-10.56.03/lib/libpam.c.security-code netpbm-10.56.03/lib/libpam.c
                        
      if (tuplerow != NULL) {
          /* Now we initialize the pointers to the individual tuples
-diff -up netpbm-10.56.03/lib/libpammap.c.security-code netpbm-10.56.03/lib/libpammap.c
---- netpbm-10.56.03/lib/libpammap.c.security-code	2011-11-09 09:17:53.000000000 +0100
-+++ netpbm-10.56.03/lib/libpammap.c	2011-11-09 13:11:20.694591739 +0100
+diff -up netpbm-10.58.01/lib/libpammap.c.security-code netpbm-10.58.01/lib/libpammap.c
+--- netpbm-10.58.01/lib/libpammap.c.security-code	2012-04-09 15:31:38.000000000 +0200
++++ netpbm-10.58.01/lib/libpammap.c	2012-04-09 15:40:03.228619477 +0200
 @@ -104,6 +104,8 @@ allocTupleIntListItem(struct pam * const
      */
      struct tupleint_list_item * retval;
@@ -1266,9 +1263,9 @@ diff -up netpbm-10.56.03/lib/libpammap.c.security-code netpbm-10.56.03/lib/libpa
      unsigned int const size = 
          sizeof(*retval) - sizeof(retval->tupleint.tuple) 
          + pamP->depth * sizeof(sample);
-diff -up netpbm-10.56.03/lib/libpbm1.c.security-code netpbm-10.56.03/lib/libpbm1.c
---- netpbm-10.56.03/lib/libpbm1.c.security-code	2011-11-09 09:17:53.000000000 +0100
-+++ netpbm-10.56.03/lib/libpbm1.c	2011-11-09 13:11:20.695591745 +0100
+diff -up netpbm-10.58.01/lib/libpbm1.c.security-code netpbm-10.58.01/lib/libpbm1.c
+--- netpbm-10.58.01/lib/libpbm1.c.security-code	2012-04-09 15:31:38.000000000 +0200
++++ netpbm-10.58.01/lib/libpbm1.c	2012-04-09 15:40:03.228619477 +0200
 @@ -77,6 +77,7 @@ pbm_check(FILE * file, const enum pm_che
          pm_message("pm_filepos passed to pm_check() is %u bytes",
                     sizeof(pm_filepos));
@@ -1277,10 +1274,10 @@ diff -up netpbm-10.56.03/lib/libpbm1.c.security-code netpbm-10.56.03/lib/libpbm1
          pm_check(file, check_type, need_raster_size, retval_p);
      }
  }
-diff -up netpbm-10.56.03/lib/libpm.c.security-code netpbm-10.56.03/lib/libpm.c
---- netpbm-10.56.03/lib/libpm.c.security-code	2011-11-09 09:17:53.000000000 +0100
-+++ netpbm-10.56.03/lib/libpm.c	2011-11-09 13:11:20.695591745 +0100
-@@ -787,4 +787,53 @@ pm_parse_height(const char * const arg)
+diff -up netpbm-10.58.01/lib/libpm.c.security-code netpbm-10.58.01/lib/libpm.c
+--- netpbm-10.58.01/lib/libpm.c.security-code	2012-04-09 15:31:38.000000000 +0200
++++ netpbm-10.58.01/lib/libpm.c	2012-04-09 15:40:03.229619464 +0200
+@@ -808,4 +808,53 @@ pm_parse_height(const char * const arg)
  }
  
  
@@ -1334,10 +1331,10 @@ diff -up netpbm-10.56.03/lib/libpm.c.security-code netpbm-10.56.03/lib/libpm.c
 +	return realloc(a, b*c);
 +}
  
-diff -up netpbm-10.56.03/lib/pm.h.security-code netpbm-10.56.03/lib/pm.h
---- netpbm-10.56.03/lib/pm.h.security-code	2011-11-09 09:17:53.000000000 +0100
-+++ netpbm-10.56.03/lib/pm.h	2011-11-09 13:11:20.696591750 +0100
-@@ -411,4 +411,11 @@ pm_parse_height(const char * const arg);
+diff -up netpbm-10.58.01/lib/pm.h.security-code netpbm-10.58.01/lib/pm.h
+--- netpbm-10.58.01/lib/pm.h.security-code	2012-04-09 15:31:38.000000000 +0200
++++ netpbm-10.58.01/lib/pm.h	2012-04-09 15:40:03.229619464 +0200
+@@ -432,4 +432,11 @@ pm_parse_height(const char * const arg);
  #endif
  
  
@@ -1349,9 +1346,9 @@ diff -up netpbm-10.56.03/lib/pm.h.security-code netpbm-10.56.03/lib/pm.h
 +void overflow_add(int, int);
 +
  #endif
-diff -up netpbm-10.56.03/other/pnmcolormap.c.security-code netpbm-10.56.03/other/pnmcolormap.c
---- netpbm-10.56.03/other/pnmcolormap.c.security-code	2011-11-09 09:17:48.000000000 +0100
-+++ netpbm-10.56.03/other/pnmcolormap.c	2011-11-09 13:11:20.696591750 +0100
+diff -up netpbm-10.58.01/other/pnmcolormap.c.security-code netpbm-10.58.01/other/pnmcolormap.c
+--- netpbm-10.58.01/other/pnmcolormap.c.security-code	2012-04-09 15:31:32.000000000 +0200
++++ netpbm-10.58.01/other/pnmcolormap.c	2012-04-09 15:40:03.230619451 +0200
 @@ -840,6 +840,7 @@ colormapToSquare(struct pam * const pamP
              pamP->width = intsqrt;
          else 
@@ -1360,9 +1357,9 @@ diff -up netpbm-10.56.03/other/pnmcolormap.c.security-code netpbm-10.56.03/other
      }
      {
          unsigned int const intQuotient = colormap.size / pamP->width;
-diff -up netpbm-10.56.03/urt/README.security-code netpbm-10.56.03/urt/README
---- netpbm-10.56.03/urt/README.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/README	2011-11-09 13:11:20.697591755 +0100
+diff -up netpbm-10.58.01/urt/README.security-code netpbm-10.58.01/urt/README
+--- netpbm-10.58.01/urt/README.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/README	2012-04-09 15:40:03.231619438 +0200
 @@ -18,3 +18,8 @@ in its initializer in the original.  But
  defines stdout as a variable, so that wouldn't compile.  So I changed
  it to NULL and added a line to rle_hdr_init to set that field to
@@ -1372,9 +1369,9 @@ diff -up netpbm-10.56.03/urt/README.security-code netpbm-10.56.03/urt/README
 +Removed pipe through and compress support (unsafe)
 +
 +Alan Cox <alan at redhat.com>
-diff -up netpbm-10.56.03/urt/rle_addhist.c.security-code netpbm-10.56.03/urt/rle_addhist.c
---- netpbm-10.56.03/urt/rle_addhist.c.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/rle_addhist.c	2011-11-09 13:11:20.697591755 +0100
+diff -up netpbm-10.58.01/urt/rle_addhist.c.security-code netpbm-10.58.01/urt/rle_addhist.c
+--- netpbm-10.58.01/urt/rle_addhist.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/rle_addhist.c	2012-04-09 15:40:03.231619438 +0200
 @@ -14,6 +14,8 @@
   * If you modify this software, you should include a notice giving the
   * name of the person performing the modification, the date of modification,
@@ -1384,7 +1381,7 @@ diff -up netpbm-10.56.03/urt/rle_addhist.c.security-code netpbm-10.56.03/urt/rle
   */
  /* 
   * rle_addhist.c - Add to the HISTORY comment in header
-@@ -76,13 +78,19 @@ rle_addhist(char *          argv[],
+@@ -71,13 +73,19 @@ rle_addhist(char *          argv[],
          return;
      
      length = 0;
@@ -1405,7 +1402,7 @@ diff -up netpbm-10.56.03/urt/rle_addhist.c.security-code netpbm-10.56.03/urt/rle
      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... */
-@@ -90,9 +98,12 @@ rle_addhist(char *          argv[],
+@@ -85,9 +93,12 @@ rle_addhist(char *          argv[],
      else
          old = NULL;
      
@@ -1419,9 +1416,9 @@ diff -up netpbm-10.56.03/urt/rle_addhist.c.security-code netpbm-10.56.03/urt/rle
      ++length;                               /*Cater for the null. */
  
      MALLOCARRAY(newc, length);
-diff -up netpbm-10.56.03/urt/rle_getrow.c.security-code netpbm-10.56.03/urt/rle_getrow.c
---- netpbm-10.56.03/urt/rle_getrow.c.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/rle_getrow.c	2011-11-09 13:11:20.698591761 +0100
+diff -up netpbm-10.58.01/urt/rle_getrow.c.security-code netpbm-10.58.01/urt/rle_getrow.c
+--- netpbm-10.58.01/urt/rle_getrow.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/rle_getrow.c	2012-04-09 15:40:03.232619426 +0200
 @@ -17,6 +17,8 @@
   *
   *  Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
@@ -1439,9 +1436,9 @@ diff -up netpbm-10.56.03/urt/rle_getrow.c.security-code netpbm-10.56.03/urt/rle_
          evenlen = (comlen + 1) & ~1;    /* make it even */
          if ( evenlen )
          {
-diff -up netpbm-10.56.03/urt/rle_hdr.c.security-code netpbm-10.56.03/urt/rle_hdr.c
---- netpbm-10.56.03/urt/rle_hdr.c.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/rle_hdr.c	2011-11-09 13:11:20.699591767 +0100
+diff -up netpbm-10.58.01/urt/rle_hdr.c.security-code netpbm-10.58.01/urt/rle_hdr.c
+--- netpbm-10.58.01/urt/rle_hdr.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/rle_hdr.c	2012-04-09 15:40:03.233619414 +0200
 @@ -14,6 +14,8 @@
   * If you modify this software, you should include a notice giving the
   * name of the person performing the modification, the date of modification,
@@ -1451,7 +1448,7 @@ diff -up netpbm-10.56.03/urt/rle_hdr.c.security-code netpbm-10.56.03/urt/rle_hdr
   */
  /* 
   * rle_hdr.c - Functions to manipulate rle_hdr structures.
-@@ -79,7 +81,10 @@ int img_num;
+@@ -80,7 +82,10 @@ int img_num;
      /* Fill in with copies of the strings. */
      if ( the_hdr->cmd != pgmname )
      {
@@ -1463,7 +1460,7 @@ diff -up netpbm-10.56.03/urt/rle_hdr.c.security-code netpbm-10.56.03/urt/rle_hdr
  	RLE_CHECK_ALLOC( pgmname, tmp, 0 );
  	strcpy( tmp, pgmname );
  	the_hdr->cmd = tmp;
-@@ -87,7 +92,9 @@ int img_num;
+@@ -88,7 +93,9 @@ int img_num;
  
      if ( the_hdr->file_name != fname )
      {
@@ -1474,7 +1471,7 @@ diff -up netpbm-10.56.03/urt/rle_hdr.c.security-code netpbm-10.56.03/urt/rle_hdr
  	RLE_CHECK_ALLOC( pgmname, tmp, 0 );
  	strcpy( tmp, fname );
  	the_hdr->file_name = tmp;
-@@ -152,6 +159,7 @@ rle_hdr *from_hdr, *to_hdr;
+@@ -153,6 +160,7 @@ rle_hdr *from_hdr, *to_hdr;
      if ( to_hdr->bg_color )
      {
  	int size = to_hdr->ncolors * sizeof(int);
@@ -1482,7 +1479,7 @@ diff -up netpbm-10.56.03/urt/rle_hdr.c.security-code netpbm-10.56.03/urt/rle_hdr
  	to_hdr->bg_color = (int *)malloc( size );
  	RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->bg_color, "background color" );
  	memcpy( to_hdr->bg_color, from_hdr->bg_color, size );
-@@ -160,7 +168,7 @@ rle_hdr *from_hdr, *to_hdr;
+@@ -161,7 +169,7 @@ rle_hdr *from_hdr, *to_hdr;
      if ( to_hdr->cmap )
      {
  	int size = to_hdr->ncmap * (1 << to_hdr->cmaplen) * sizeof(rle_map);
@@ -1491,7 +1488,7 @@ diff -up netpbm-10.56.03/urt/rle_hdr.c.security-code netpbm-10.56.03/urt/rle_hdr
  	RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->cmap, "color map" );
  	memcpy( to_hdr->cmap, from_hdr->cmap, size );
      }
-@@ -173,11 +181,16 @@ rle_hdr *from_hdr, *to_hdr;
+@@ -174,11 +182,16 @@ rle_hdr *from_hdr, *to_hdr;
  	int size = 0;
  	CONST_DECL char **cp;
  	for ( cp=to_hdr->comments; *cp; cp++ )
@@ -1508,9 +1505,9 @@ diff -up netpbm-10.56.03/urt/rle_hdr.c.security-code netpbm-10.56.03/urt/rle_hdr
  	    size *= sizeof(char *);
  	    to_hdr->comments = (CONST_DECL char **)malloc( size );
  	    RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->comments, "comments" );
-diff -up netpbm-10.56.03/urt/rle.h.security-code netpbm-10.56.03/urt/rle.h
---- netpbm-10.56.03/urt/rle.h.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/rle.h	2011-11-09 13:11:20.699591767 +0100
+diff -up netpbm-10.58.01/urt/rle.h.security-code netpbm-10.58.01/urt/rle.h
+--- netpbm-10.58.01/urt/rle.h.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/rle.h	2012-04-09 15:40:03.233619414 +0200
 @@ -14,6 +14,9 @@
   * If you modify this software, you should include a notice giving the
   * name of the person performing the modification, the date of modification,
@@ -1521,7 +1518,7 @@ diff -up netpbm-10.56.03/urt/rle.h.security-code netpbm-10.56.03/urt/rle.h
   */
  /* 
   * rle.h - Global declarations for Utah Raster Toolkit RLE programs.
-@@ -166,6 +169,17 @@ rle_hdr             /* End of typedef. *
+@@ -160,6 +163,17 @@ rle_hdr             /* End of typedef. *
   */
  extern rle_hdr rle_dflt_hdr;
  
@@ -1539,10 +1536,10 @@ diff -up netpbm-10.56.03/urt/rle.h.security-code netpbm-10.56.03/urt/rle.h
  
  /* Declare RLE library routines. */
  
-diff -up netpbm-10.56.03/urt/rle_open_f.c.security-code netpbm-10.56.03/urt/rle_open_f.c
---- netpbm-10.56.03/urt/rle_open_f.c.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/rle_open_f.c	2011-11-09 13:32:23.239619714 +0100
-@@ -162,65 +162,7 @@ dealWithSubprocess(const char *  const f
+diff -up netpbm-10.58.01/urt/rle_open_f.c.security-code netpbm-10.58.01/urt/rle_open_f.c
+--- netpbm-10.58.01/urt/rle_open_f.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/rle_open_f.c	2012-04-09 15:40:03.234619402 +0200
+@@ -163,65 +163,7 @@ dealWithSubprocess(const char *  const f
                     FILE **       const fpP,
                     bool *        const noSubprocessP,
                     const char ** const errorP) {
@@ -1608,9 +1605,9 @@ diff -up netpbm-10.56.03/urt/rle_open_f.c.security-code netpbm-10.56.03/urt/rle_
  }
  
  
-diff -up netpbm-10.56.03/urt/rle_putcom.c.security-code netpbm-10.56.03/urt/rle_putcom.c
---- netpbm-10.56.03/urt/rle_putcom.c.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/rle_putcom.c	2011-11-09 13:11:20.701591779 +0100
+diff -up netpbm-10.58.01/urt/rle_putcom.c.security-code netpbm-10.58.01/urt/rle_putcom.c
+--- netpbm-10.58.01/urt/rle_putcom.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/rle_putcom.c	2012-04-09 15:40:03.234619402 +0200
 @@ -14,6 +14,8 @@
   * If you modify this software, you should include a notice giving the
   * name of the person performing the modification, the date of modification,
@@ -1636,9 +1633,9 @@ diff -up netpbm-10.56.03/urt/rle_putcom.c.security-code netpbm-10.56.03/urt/rle_
          /* Not found */
          /* Can't realloc because somebody else might be pointing to this
           * comments block.  Of course, if this were true, then the
-diff -up netpbm-10.56.03/urt/Runput.c.security-code netpbm-10.56.03/urt/Runput.c
---- netpbm-10.56.03/urt/Runput.c.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/Runput.c	2011-11-09 13:11:20.701591779 +0100
+diff -up netpbm-10.58.01/urt/Runput.c.security-code netpbm-10.58.01/urt/Runput.c
+--- netpbm-10.58.01/urt/Runput.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/Runput.c	2012-04-09 15:40:03.235619390 +0200
 @@ -17,6 +17,8 @@
   *
   *  Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
@@ -1671,9 +1668,9 @@ diff -up netpbm-10.56.03/urt/Runput.c.security-code netpbm-10.56.03/urt/Runput.c
  	if ( h_cmap == NULL )
  	{
  	    fprintf( stderr,
-diff -up netpbm-10.56.03/urt/scanargs.c.security-code netpbm-10.56.03/urt/scanargs.c
---- netpbm-10.56.03/urt/scanargs.c.security-code	2011-11-09 09:18:08.000000000 +0100
-+++ netpbm-10.56.03/urt/scanargs.c	2011-11-09 13:11:20.702591785 +0100
+diff -up netpbm-10.58.01/urt/scanargs.c.security-code netpbm-10.58.01/urt/scanargs.c
+--- netpbm-10.58.01/urt/scanargs.c.security-code	2012-04-09 15:31:45.000000000 +0200
++++ netpbm-10.58.01/urt/scanargs.c	2012-04-09 15:40:03.235619390 +0200
 @@ -38,6 +38,8 @@
   *
   *  Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
@@ -1683,7 +1680,7 @@ diff -up netpbm-10.56.03/urt/scanargs.c.security-code netpbm-10.56.03/urt/scanar
   */
  
  #include "rle.h"
-@@ -65,8 +67,8 @@ typedef int *ptr;
+@@ -63,8 +65,8 @@ typedef int *ptr;
  /* 
   * Storage allocation macros
   */
@@ -1692,5 +1689,5 @@ diff -up netpbm-10.56.03/urt/scanargs.c.security-code netpbm-10.56.03/urt/scanar
 +#define NEW( type, cnt )	(type *) malloc2( (cnt) , sizeof( type ) )
 +#define RENEW( type, ptr, cnt )	(type *) realloc2( ptr, (cnt), sizeof( type ) )
  
- #if defined(c_plusplus) && !defined(USE_PROTOTYPES)
- #define USE_PROTOTYPES
+ static CONST_DECL char * prformat( CONST_DECL char *, int );
+ static int isnum( CONST_DECL char *, int, int );
diff --git a/netpbm-security-scripts.patch b/netpbm-security-scripts.patch
index 557914b..831be82 100644
--- a/netpbm-security-scripts.patch
+++ b/netpbm-security-scripts.patch
@@ -356,24 +356,6 @@ diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/
 +system("rm $tmpdir/junk*$$.ppm");
  
  exit(0);
-diff -up netpbm-10.47.05/editor/ppmquantall.security-scripts netpbm-10.47.05/editor/ppmquantall
---- netpbm-10.47.05/editor/ppmquantall.security-scripts	2009-12-10 08:34:32.000000000 +0100
-+++ netpbm-10.47.05/editor/ppmquantall	2010-03-16 21:28:09.000000000 +0100
-@@ -70,12 +70,8 @@ for i in ${files[@]}; do
-     heights=(${heights[*]} `grep -v '^#' $i | sed '1d; s/.* //; 2q'`)
- done
- 
--tempdir="${TMPDIR-/tmp}/ppmquantall.$$"
--mkdir -m 0700 $tempdir || \
--  { echo "Could not create temporary file. Exiting."; exit 1;}
--trap 'rm -rf $tempdir' 0 1 3 15
--
--all=$tempdir/pqa.all.$$
-+all=$(mktemp -t pqa.all.XXXXXXXXXX) || exit 1
-+rm -f $all
- 
- pnmcat -topbottom -jleft -white ${files[@]} | pnmquant $newcolors > $all
- if [ $? != 0 ]; then
 diff -up netpbm-10.47.05/editor/ppmshadow.security-scripts netpbm-10.47.05/editor/ppmshadow
 --- netpbm-10.47.05/editor/ppmshadow.security-scripts	2009-12-10 08:34:32.000000000 +0100
 +++ netpbm-10.47.05/editor/ppmshadow	2010-03-16 21:28:09.000000000 +0100
diff --git a/netpbm.spec b/netpbm.spec
index 17da309..a6cc86d 100644
--- a/netpbm.spec
+++ b/netpbm.spec
@@ -1,6 +1,6 @@
 Summary: A library for handling different graphics file formats
 Name: netpbm
-Version: 10.57.01
+Version: 10.58.01
 Release: 1%{?dist}
 # See copyright_summary for details
 License: BSD and GPLv2 and IJG and MIT and Public Domain
@@ -31,6 +31,8 @@ Patch20: netpbm-noppmtompeg.patch
 Patch21: netpbm-cmuwtopbm.patch
 Patch22: netpbm-pamtojpeg2k.patch
 Patch23: netpbm-manfix.patch
+Patch24: netpbm-ppmtopict.patch
+Patch25: netpbm-pnmtopclxl.patch
 BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
 BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel
 
@@ -102,6 +104,8 @@ netpbm-doc.  You'll also need to install the netpbm-progs package.
 %patch21 -p1 -b .cmuwtopbmfix
 %patch22 -p1 -b .pamtojpeg2kfix
 %patch23 -p1 -b .manfix
+%patch24 -p1 -b .ppmtopict
+%patch25 -p1 -b .pnmtopclxl
 
 sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in
 rm -rf converter/other/jpeg2000/libjasper/
@@ -245,6 +249,11 @@ rm -rf $RPM_BUILD_ROOT
 %doc userguide/*
 
 %changelog
+* Thu Jun 14 2012 Jindrich Novy <jnovy at redhat.com> 10.58.01-1
+- update to 10.58.01
+- fix ppmtopict buffer underflow
+- fix memory corruption in pnmtopclxl
+
 * Tue Jan 17 2012 Jindrich Novy <jnovy at redhat.com> 10.57.01-1
 - update to 10.57.01
 
diff --git a/sources b/sources
index fcf0908..e1ee852 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-265e35c66926967dc41ee3f257ff057d  netpbm-10.57.01.tar.xz
+9b2aad8289006861eddd12e786046eb2  netpbm-10.58.01.tar.xz


More information about the scm-commits mailing list