[netpbm] update to 10.56.03
Jindrich Novy
jnovy at fedoraproject.org
Fri Nov 11 11:36:54 UTC 2011
commit d60ce20b01a7003208833bb41b3944c00cd0310b
Author: Jindrich Novy <jnovy at redhat.com>
Date: Fri Nov 11 12:36:37 2011 +0100
update to 10.56.03
.gitignore | 2 +-
netpbm-CAN-2005-2471.patch | 11 +-
netpbm-lz.patch | 12 -
netpbm-pnmmontagefix.patch | 832 ----------------------------------------
netpbm-security-code.patch | 905 +++++++++++++++++++-------------------------
netpbm-svgtopam.patch | 14 -
netpbm.spec | 20 +-
sources | 2 +-
8 files changed, 406 insertions(+), 1392 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 654bc89..6e9d0bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/netpbm-10.47.32.tar.xz
+/netpbm-10.56.03.tar.xz
diff --git a/netpbm-CAN-2005-2471.patch b/netpbm-CAN-2005-2471.patch
index 8cbbd6d..ee9935f 100644
--- a/netpbm-CAN-2005-2471.patch
+++ b/netpbm-CAN-2005-2471.patch
@@ -1,9 +1,10 @@
---- netpbm-10.29/converter/other/pstopnm.c.CAN-2005-2471 2005-08-15 02:39:46.000000000 +0200
-+++ netpbm-10.29/converter/other/pstopnm.c 2005-08-16 15:38:15.000000000 +0200
-@@ -711,11 +711,11 @@
- "'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'",
+diff -up netpbm-10.56.03/converter/other/pstopnm.c.CAN-2005-2471 netpbm-10.56.03/converter/other/pstopnm.c
+--- netpbm-10.56.03/converter/other/pstopnm.c.CAN-2005-2471 2011-11-09 09:18:00.000000000 +0100
++++ netpbm-10.56.03/converter/other/pstopnm.c 2011-11-11 11:43:51.827409226 +0100
+@@ -747,11 +747,11 @@ execGhostscript(int const input
ghostscriptProg, arg0,
- deviceopt, outfileopt, gopt, ropt, "-q", "-dNOPAUSE",
+ deviceopt, outfileopt, gopt, ropt, textalphabitsopt,
+ "-q", "-dNOPAUSE",
- "-dSAFER", "-");
+ "-dPARANOIDSAFER", "-");
}
diff --git a/netpbm-security-code.patch b/netpbm-security-code.patch
index e8fbc29..373c86d 100644
--- a/netpbm-security-code.patch
+++ b/netpbm-security-code.patch
@@ -1,39 +1,35 @@
-diff -up netpbm-10.47.04/analyzer/pgmtexture.c.security netpbm-10.47.04/analyzer/pgmtexture.c
---- netpbm-10.47.04/analyzer/pgmtexture.c.security 2009-10-21 13:38:55.000000000 +0200
-+++ netpbm-10.47.04/analyzer/pgmtexture.c 2009-10-21 15:09:33.000000000 +0200
-@@ -79,6 +79,9 @@ vector (int nl, int nh)
- {
- float *v;
-
-+ if(nh < nl)
-+ pm_error("assert: h < l");
+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
+@@ -97,7 +97,7 @@ vector(unsigned int const nl,
+ float * v;
+
+ assert(nh >= nl);
+-
+ overflow_add(nh - nl, 1);
MALLOCARRAY(v, (unsigned) (nh - nl + 1));
+
if (v == NULL)
- pm_error("Unable to allocate memory for a vector.");
-@@ -95,6 +98,9 @@ matrix (int nrl, int nrh, int ncl, int n
- float **m;
+@@ -129,6 +129,7 @@ matrix (unsigned int const nrl,
+ assert(nrh >= nrl);
/* allocate pointers to rows */
-+ if(nrh < nrl)
-+ pm_error("assert: h < l");
+ overflow_add(nrh - nrl, 1);
MALLOCARRAY(m, (unsigned) (nrh - nrl + 1));
if (m == NULL)
pm_error("Unable to allocate memory for a matrix.");
-@@ -102,6 +108,9 @@ matrix (int nrl, int nrh, int ncl, int n
+@@ -136,7 +137,7 @@ matrix (unsigned int const nrl,
m -= ncl;
- /* allocate rows and set pointers to them */
-+ if(nch < ncl)
-+ pm_error("assert: h < l");
+ assert (nch >= ncl);
+-
+ overflow_add(nch - ncl, 1);
- for (i = nrl; i <= nrh; i++)
- {
+ /* allocate rows and set pointers to them */
+ for (i = nrl; i <= nrh; ++i) {
MALLOCARRAY(m[i], (unsigned) (nch - ncl + 1));
-diff -up netpbm-10.47.04/converter/other/gemtopnm.c.security netpbm-10.47.04/converter/other/gemtopnm.c
---- netpbm-10.47.04/converter/other/gemtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/gemtopnm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -106,6 +106,7 @@ main(argc, argv)
pnm_writepnminit( stdout, cols, rows, MAXVAL, type, 0 );
@@ -42,10 +38,10 @@ diff -up netpbm-10.47.04/converter/other/gemtopnm.c.security netpbm-10.47.04/con
{
/* allocate input row data structure */
int plane;
-diff -up netpbm-10.47.04/converter/other/jpegtopnm.c.security netpbm-10.47.04/converter/other/jpegtopnm.c
---- netpbm-10.47.04/converter/other/jpegtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/jpegtopnm.c 2009-10-21 15:54:30.000000000 +0200
-@@ -861,6 +861,8 @@ convertImage(FILE *
+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
+@@ -861,6 +861,8 @@ convertImage(FILE *
/* Calculate output image dimensions so we can allocate space */
jpeg_calc_output_dimensions(cinfoP);
@@ -54,9 +50,9 @@ diff -up netpbm-10.47.04/converter/other/jpegtopnm.c.security netpbm-10.47.04/co
/* Start decompressor */
jpeg_start_decompress(cinfoP);
-diff -up netpbm-10.47.04/converter/other/pbmtopgm.c.security netpbm-10.47.04/converter/other/pbmtopgm.c
---- netpbm-10.47.04/converter/other/pbmtopgm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/pbmtopgm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -47,6 +47,7 @@ main(int argc, char *argv[]) {
"than the image height (%u rows)", height, rows);
@@ -65,10 +61,9 @@ diff -up netpbm-10.47.04/converter/other/pbmtopgm.c.security netpbm-10.47.04/con
maxval = MIN(PGM_OVERALLMAXVAL, width*height);
pgm_writepgminit(stdout, cols, rows, maxval, 0) ;
-diff -up netpbm-10.47.04/converter/other/pngtopnm.c.security netpbm-10.47.04/converter/other/pngtopnm.c
-diff -up netpbm-10.47.04/converter/other/pnmtoddif.c.security netpbm-10.47.04/converter/other/pnmtoddif.c
---- netpbm-10.47.04/converter/other/pnmtoddif.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/pnmtoddif.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -632,6 +632,7 @@ main(int argc, char *argv[]) {
switch (PNM_FORMAT_TYPE(format)) {
case PBM_TYPE:
@@ -85,9 +80,9 @@ diff -up netpbm-10.47.04/converter/other/pnmtoddif.c.security netpbm-10.47.04/co
ip.bytes_per_line = 3 * cols;
ip.bits_per_pixel = 24;
ip.spectral = 5;
-diff -up netpbm-10.47.04/converter/other/pnmtojpeg.c.security netpbm-10.47.04/converter/other/pnmtojpeg.c
---- netpbm-10.47.04/converter/other/pnmtojpeg.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/pnmtojpeg.c 2009-10-21 15:56:32.000000000 +0200
+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
@@ -605,7 +605,11 @@ read_scan_script(j_compress_ptr const ci
want JPOOL_PERMANENT.
*/
@@ -101,7 +96,7 @@ diff -up netpbm-10.47.04/converter/other/pnmtojpeg.c.security netpbm-10.47.04/co
(jpeg_scan_info *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
scan_info_size);
-@@ -936,6 +940,8 @@ compute_rescaling_array(JSAMPLE ** const
+@@ -937,6 +941,8 @@ compute_rescaling_array(JSAMPLE ** const
const long half_maxval = maxval / 2;
long val;
@@ -110,7 +105,7 @@ diff -up netpbm-10.47.04/converter/other/pnmtojpeg.c.security netpbm-10.47.04/co
*rescale_p = (JSAMPLE *)
(cinfo.mem->alloc_small) ((j_common_ptr) &cinfo, JPOOL_IMAGE,
(size_t) (((long) maxval + 1L) *
-@@ -1014,6 +1020,7 @@ convert_scanlines(struct jpeg_compress_s
+@@ -1015,6 +1021,7 @@ convert_scanlines(struct jpeg_compress_s
*/
/* Allocate the libpnm output and compressor input buffers */
@@ -118,37 +113,35 @@ diff -up netpbm-10.47.04/converter/other/pnmtojpeg.c.security netpbm-10.47.04/co
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.47.04/converter/other/pnmtops.c.security netpbm-10.47.04/converter/other/pnmtops.c
---- netpbm-10.47.04/converter/other/pnmtops.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/pnmtops.c 2009-10-21 15:09:33.000000000 +0200
-@@ -186,16 +186,20 @@ parseCommandLine(int argc, char ** argv,
- cmdlineP->canturn = !noturn;
- cmdlineP->showpage = !noshowpage;
+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
+@@ -256,17 +256,21 @@ parseCommandLine(int argc, const char **
+ validateCompDimension(width, 72, "-width value");
+ validateCompDimension(height, 72, "-height value");
+ overflow2(width, 72);
cmdlineP->width = width * 72;
+ overflow2(height, 72);
cmdlineP->height = height * 72;
-- if (imagewidthSpec)
-+ if (imagewidthSpec) {
+ if (imagewidthSpec) {
+ validateCompDimension(imagewidth, 72, "-imagewidth value");
+ overflow2(imagewidth, 72);
cmdlineP->imagewidth = imagewidth * 72;
-- else
-+ } else
+ }
+ else
cmdlineP->imagewidth = 0;
-- if (imageheightSpec)
-+ if (imageheightSpec) {
+ if (imageheightSpec) {
+- validateCompDimension(imagewidth, 72, "-imageheight value");
++ validateCompDimension(imageheight, 72, "-imageheight value");
+ overflow2(imageheight, 72);
cmdlineP->imageheight = imageheight * 72;
-- else
-+ } else
- cmdlineP->imageheight = 0;
-
- if (!cmdlineP->psfilter &&
-diff -up netpbm-10.47.04/converter/other/pnmtorle.c.security netpbm-10.47.04/converter/other/pnmtorle.c
---- netpbm-10.47.04/converter/other/pnmtorle.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/pnmtorle.c 2009-10-21 15:09:33.000000000 +0200
+ }
+ 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
@@ -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,
@@ -158,33 +151,10 @@ diff -up netpbm-10.47.04/converter/other/pnmtorle.c.security netpbm-10.47.04/con
*/
/*
* pnmtorle - A program which will convert pbmplus (ppm or pgm) images
-diff -up netpbm-10.47.04/converter/other/pnmtosgi.c.security netpbm-10.47.04/converter/other/pnmtosgi.c
---- netpbm-10.47.04/converter/other/pnmtosgi.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/pnmtosgi.c 2009-10-21 15:09:33.000000000 +0200
-@@ -213,6 +213,22 @@ write_channels(cols, rows, channels, put
- }
- }
-
-+static void *
-+xmalloc2(int x, int y)
-+{
-+ void *mem;
-+
-+ overflow2(x,y);
-+ if( x * y == 0 )
-+ return NULL;
-+
-+ mem = malloc2(x, y);
-+ if( mem == NULL )
-+ pm_error("out of memory allocating %d bytes", x * y);
-+ return mem;
-+}
-+
-+
- static void
- put_big_short(short s)
- {
-@@ -250,6 +266,7 @@ build_channels(FILE *ifp, int cols, int
+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
+@@ -254,6 +254,7 @@ build_channels(FILE * const ifp, int con
#endif
if( storage != STORAGE_VERBATIM ) {
@@ -192,7 +162,7 @@ diff -up netpbm-10.47.04/converter/other/pnmtosgi.c.security netpbm-10.47.04/con
MALLOCARRAY_NOFAIL(table, channels * rows);
MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
}
-@@ -303,6 +320,8 @@ compress(temp, row, rows, cols, chan_no,
+@@ -306,6 +307,8 @@ compress(ScanElem * temp,
break;
case STORAGE_RLE:
tabrow = chan_no * rows + row;
@@ -201,9 +171,9 @@ diff -up netpbm-10.47.04/converter/other/pnmtosgi.c.security netpbm-10.47.04/con
len = rle_compress(temp, cols); /* writes result into rletemp */
channel[chan_no][row].length = len;
MALLOCARRAY(p, len);
-diff -up netpbm-10.47.04/converter/other/rletopnm.c.security netpbm-10.47.04/converter/other/rletopnm.c
---- netpbm-10.47.04/converter/other/rletopnm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/rletopnm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -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,
@@ -213,31 +183,28 @@ diff -up netpbm-10.47.04/converter/other/rletopnm.c.security netpbm-10.47.04/con
*/
/*
* rletopnm - A conversion program to convert from Utah's "rle" image format
-diff -up netpbm-10.47.04/converter/other/sgitopnm.c.security netpbm-10.47.04/converter/other/sgitopnm.c
---- netpbm-10.47.04/converter/other/sgitopnm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/sgitopnm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -252,13 +252,17 @@ read_channels(ifp, head, table, func, oc
-
- if (ochan < 0) {
- maxchannel = (head->zsize < 3) ? head->zsize : 3;
+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
+@@ -359,10 +359,14 @@ readChannels(FILE * const ifP,
+ MALLOCARRAY_NOFAIL(image, head->ysize);
+ } else {
+ maxchannel = MIN(3, head->zsize);
+ overflow2(head->ysize, maxchannel);
MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
- } else {
- maxchannel = ochan + 1;
- MALLOCARRAY_NOFAIL(image, head->ysize);
}
-- if ( table )
-+ if ( table ) {
+- if (table)
++ if (table) {
+ overflow2(head->xsize, 2);
+ overflow_add(head->xsize*2, 2);
MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
+ }
- for( channel = 0; channel < maxchannel; channel++ ) {
- #ifdef DEBUG
-diff -up netpbm-10.47.04/converter/other/sirtopnm.c.security netpbm-10.47.04/converter/other/sirtopnm.c
---- netpbm-10.47.04/converter/other/sirtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/sirtopnm.c 2009-10-21 15:09:33.000000000 +0200
+ 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
@@ -69,6 +69,7 @@ char* argv[];
}
break;
@@ -246,10 +213,10 @@ diff -up netpbm-10.47.04/converter/other/sirtopnm.c.security netpbm-10.47.04/con
picsize = cols * rows * 3;
planesize = cols * rows;
if ( !( sirarray = (unsigned char*) malloc( picsize ) ) )
-diff -up netpbm-10.47.04/converter/other/tifftopnm.c.security netpbm-10.47.04/converter/other/tifftopnm.c
---- netpbm-10.47.04/converter/other/tifftopnm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/tifftopnm.c 2009-10-21 15:49:29.000000000 +0200
-@@ -1291,7 +1291,9 @@ convertRasterByRows(pnmOut * const
+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
+@@ -1279,7 +1279,9 @@ convertRasterByRows(pnmOut * const
if (scanbuf == NULL)
pm_error("can't allocate memory for scanline buffer");
@@ -260,9 +227,9 @@ diff -up netpbm-10.47.04/converter/other/tifftopnm.c.security netpbm-10.47.04/co
if (samplebuf == NULL)
pm_error("can't allocate memory for row buffer");
-diff -up netpbm-10.47.04/converter/other/xwdtopnm.c.security netpbm-10.47.04/converter/other/xwdtopnm.c
---- netpbm-10.47.04/converter/other/xwdtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/other/xwdtopnm.c 2009-10-21 15:53:27.000000000 +0200
+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
@@ -209,6 +209,10 @@ processX10Header(X10WDFileHeader * cons
*colorsP = pnm_allocrow(2);
PNM_ASSIGN1((*colorsP)[0], 0);
@@ -282,32 +249,9 @@ diff -up netpbm-10.47.04/converter/other/xwdtopnm.c.security netpbm-10.47.04/con
*padrightP =
h11FixedP->bytes_per_line * 8 -
h11FixedP->pixmap_width * h11FixedP->bits_per_pixel;
-diff -up netpbm-10.47.04/converter/pbm/icontopbm.c.security netpbm-10.47.04/converter/pbm/icontopbm.c
---- netpbm-10.47.04/converter/pbm/icontopbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/icontopbm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -11,6 +11,7 @@
- */
-
- #include <string.h>
-+#include <limits.h>
-
- #include "nstring.h"
- #include "pbm.h"
-@@ -87,6 +88,11 @@ ReadIconFile(FILE * const
- if ( *heightP <= 0 )
- pm_error( "invalid height (must be positive): %d", *heightP );
-
-+ if ( *widthP > INT_MAX - 16 || *widthP < 0)
-+ pm_error( "invalid width: %d", *widthP);
-+
-+ overflow2(*widthP + 16, *heightP);
-+
- data_length = BitmapSize( *widthP, *heightP );
- *dataP = (short unsigned int *) malloc( data_length );
- if ( *dataP == NULL )
-diff -up netpbm-10.47.04/converter/pbm/mdatopbm.c.security netpbm-10.47.04/converter/pbm/mdatopbm.c
---- netpbm-10.47.04/converter/pbm/mdatopbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/mdatopbm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -245,10 +245,13 @@ main(int argc, char **argv) {
pm_readlittleshort(infile, &yy); nInCols = yy;
}
@@ -323,9 +267,9 @@ diff -up netpbm-10.47.04/converter/pbm/mdatopbm.c.security netpbm-10.47.04/conve
data = pbm_allocarray(nOutCols, nOutRows);
-diff -up netpbm-10.47.04/converter/pbm/mgrtopbm.c.security netpbm-10.47.04/converter/pbm/mgrtopbm.c
---- netpbm-10.47.04/converter/pbm/mgrtopbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/mgrtopbm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -65,6 +65,8 @@ readMgrHeader(FILE * const ifP,
if (head.h_high < ' ' || head.l_high < ' ')
pm_error("Invalid width field in MGR header");
@@ -335,58 +279,11 @@ diff -up netpbm-10.47.04/converter/pbm/mgrtopbm.c.security netpbm-10.47.04/conve
*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.47.04/converter/pbm/pbmto10x.c.security netpbm-10.47.04/converter/pbm/pbmto10x.c
---- netpbm-10.47.04/converter/pbm/pbmto10x.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmto10x.c 2009-10-21 15:09:33.000000000 +0200
-@@ -162,7 +162,7 @@ main(int argc, char * argv[]) {
- res_60x72();
-
- pm_close(ifp);
-- exit(0);
-+ return 0;
- }
-
-
-diff -up netpbm-10.47.04/converter/pbm/pbmto4425.c.security netpbm-10.47.04/converter/pbm/pbmto4425.c
---- netpbm-10.47.04/converter/pbm/pbmto4425.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmto4425.c 2009-10-21 15:09:33.000000000 +0200
-@@ -2,6 +2,7 @@
-
- #include "nstring.h"
- #include "pbm.h"
-+#include <string.h>
-
- static char bit_table[2][3] = {
- {1, 4, 0x10},
-@@ -160,7 +161,7 @@ main(int argc, char * argv[]) {
- xres = vmap_width * 2;
- yres = vmap_height * 3;
-
-- vmap = malloc(vmap_width * vmap_height * sizeof(char));
-+ vmap = malloc3(vmap_width, vmap_height, sizeof(char));
- if(vmap == NULL)
- {
- pm_error( "Cannot allocate memory" );
-diff -up netpbm-10.47.04/converter/pbm/pbmtoascii.c.security netpbm-10.47.04/converter/pbm/pbmtoascii.c
---- netpbm-10.47.04/converter/pbm/pbmtoascii.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtoascii.c 2009-10-21 15:09:33.000000000 +0200
-@@ -115,9 +115,11 @@ char* argv[];
- pm_usage( usage );
-
- pbm_readpbminit( ifp, &cols, &rows, &format );
-+ overflow_add(cols, gridx);
- ccols = ( cols + gridx - 1 ) / gridx;
- bitrow = pbm_allocrow( cols );
- sig = (int*) pm_allocrow( ccols, sizeof(int) );
-+ overflow_add(ccols, 1);
- line = (char*) pm_allocrow( ccols + 1, sizeof(char) );
-
- for ( row = 0; row < rows; row += gridy )
-diff -up netpbm-10.47.04/converter/pbm/pbmtocmuwm.c.security netpbm-10.47.04/converter/pbm/pbmtocmuwm.c
-diff -up netpbm-10.47.04/converter/pbm/pbmtogem.c.security netpbm-10.47.04/converter/pbm/pbmtogem.c
---- netpbm-10.47.04/converter/pbm/pbmtogem.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtogem.c 2009-10-21 15:09:33.000000000 +0200
-@@ -123,6 +123,7 @@ putinit (rows, cols)
+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
+@@ -79,6 +79,7 @@ putinit (int const rows, int const cols)
bitsperitem = 0;
bitshift = 7;
outcol = 0;
@@ -394,9 +291,9 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtogem.c.security netpbm-10.47.04/conve
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.47.04/converter/pbm/pbmtogo.c.security netpbm-10.47.04/converter/pbm/pbmtogo.c
---- netpbm-10.47.04/converter/pbm/pbmtogo.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtogo.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -158,6 +158,7 @@ main(int argc,
bitrow = pbm_allocrow(cols);
@@ -405,20 +302,9 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtogo.c.security netpbm-10.47.04/conver
rucols = ( cols + 7 ) / 8;
bytesperrow = rucols; /* GraphOn uses bytes */
rucols = rucols * 8;
-diff -up netpbm-10.47.04/converter/pbm/pbmtoicon.c.security netpbm-10.47.04/converter/pbm/pbmtoicon.c
---- netpbm-10.47.04/converter/pbm/pbmtoicon.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtoicon.c 2009-10-21 15:38:55.000000000 +0200
-@@ -114,6 +114,7 @@ writeIcon(FILE * const ifP,
- unsigned char * bitrow;
- unsigned int row;
-
-+ overflow_add(cols, 15);
- bitbuffer = pbm_allocrow_packed(cols + wordintSize);
- bitrow = &bitbuffer[1];
- bitbuffer[0] = 0;
-diff -up netpbm-10.47.04/converter/pbm/pbmtolj.c.security netpbm-10.47.04/converter/pbm/pbmtolj.c
---- netpbm-10.47.04/converter/pbm/pbmtolj.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtolj.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -120,7 +120,11 @@ parseCommandLine(int argc, char ** argv,
static void
allocateBuffers(unsigned int const cols) {
@@ -431,9 +317,9 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtolj.c.security netpbm-10.47.04/conver
packBufferSize = rowBufferSize + (rowBufferSize + 127) / 128 + 1;
deltaBufferSize = rowBufferSize + rowBufferSize / 8 + 10;
-diff -up netpbm-10.47.04/converter/pbm/pbmtomacp.c.security netpbm-10.47.04/converter/pbm/pbmtomacp.c
---- netpbm-10.47.04/converter/pbm/pbmtomacp.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtomacp.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -101,6 +101,7 @@ char *argv[];
if( !lflg )
left = 0;
@@ -451,9 +337,9 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtomacp.c.security netpbm-10.47.04/conv
if( bflg )
{ if( bottom - top >= MAX_LINES )
bottom = top + MAX_LINES - 1;
-diff -up netpbm-10.47.04/converter/pbm/pbmtomda.c.security netpbm-10.47.04/converter/pbm/pbmtomda.c
---- netpbm-10.47.04/converter/pbm/pbmtomda.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtomda.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -179,6 +179,7 @@ int main(int argc, char **argv)
nOutRowsUnrounded = bScale ? nInRows/2 : nInRows;
@@ -462,11 +348,10 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtomda.c.security netpbm-10.47.04/conve
nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4;
/* MDA wants rows a multiple of 4 */
nOutCols = nInCols / 8;
-diff -up netpbm-10.47.04/converter/pbm/pbmtomgr.c.security netpbm-10.47.04/converter/pbm/pbmtomgr.c
-diff -up netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c.security netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c
---- netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -105,6 +105,7 @@ int pbm_readline(pbm_stat* pbm,unsigned
+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
+@@ -105,6 +105,7 @@ int pbm_readline(pbm_stat* pbm,unsigned
return 0;
case P4:
@@ -484,9 +369,9 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c.security netpbm-10.47.04/c
memcpy (pbm->revdata, data, (pbm->width+7)/8);
pbm->current_line--;
}
-diff -up netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c.security netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c
---- netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -441,6 +441,7 @@ main(int argc, char *argv[]) {
pm_error("main(): unrecognized parameter '%s'", argv[argn]);
}
@@ -495,9 +380,9 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c.security netpbm-10.47
Pwidth=(Width+7)/8;
printer.fptr=out;
-diff -up netpbm-10.47.04/converter/pbm/pbmtoxbm.c.security netpbm-10.47.04/converter/pbm/pbmtoxbm.c
---- netpbm-10.47.04/converter/pbm/pbmtoxbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtoxbm.c 2009-10-21 15:36:54.000000000 +0200
+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
@@ -335,6 +335,8 @@ convertRaster(FILE * const ifP,
unsigned char * bitrow;
@@ -507,20 +392,20 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtoxbm.c.security netpbm-10.47.04/conve
putinit(xbmVersion);
-diff -up netpbm-10.47.04/converter/pbm/pbmtoybm.c.security netpbm-10.47.04/converter/pbm/pbmtoybm.c
---- netpbm-10.47.04/converter/pbm/pbmtoybm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtoybm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -45,6 +45,7 @@ main( argc, argv )
- bitrow = pbm_allocrow( cols );
+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
+@@ -113,6 +113,7 @@ main(int argc, const char *argv[]) {
+ bitrow = pbm_allocrow(cols);
/* Compute padding to round cols up to the nearest multiple of 16. */
+ overflow_add(cols, 16);
- padright = ( ( cols + 15 ) / 16 ) * 16 - cols;
+ padright = ((cols + 15) / 16) * 16 - cols;
- putinit( cols, rows );
-diff -up netpbm-10.47.04/converter/pbm/pbmtozinc.c.security netpbm-10.47.04/converter/pbm/pbmtozinc.c
---- netpbm-10.47.04/converter/pbm/pbmtozinc.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pbmtozinc.c 2009-10-21 15:09:33.000000000 +0200
+ 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
@@ -65,6 +65,7 @@ main(int argc, char * argv[]) {
bitrow = pbm_allocrow( cols );
@@ -529,9 +414,41 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtozinc.c.security netpbm-10.47.04/conv
padright = ( ( cols + 15 ) / 16 ) * 16 - cols;
printf( "USHORT %s[] = {\n",name);
-diff -up netpbm-10.47.04/converter/pbm/pktopbm.c.security netpbm-10.47.04/converter/pbm/pktopbm.c
---- netpbm-10.47.04/converter/pbm/pktopbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/pktopbm.c 2009-10-21 15:09:33.000000000 +0200
+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
+@@ -162,7 +162,7 @@ main(int argc, char * argv[]) {
+ res_60x72();
+
+ pm_close(ifp);
+- exit(0);
++ return 0;
+ }
+
+
+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
+@@ -2,6 +2,7 @@
+
+ #include "nstring.h"
+ #include "pbm.h"
++#include <string.h>
+
+ static char bit_table[2][3] = {
+ {1, 4, 0x10},
+@@ -160,7 +161,7 @@ main(int argc, char * argv[]) {
+ xres = vmap_width * 2;
+ yres = vmap_height * 3;
+
+- vmap = malloc(vmap_width * vmap_height * sizeof(char));
++ vmap = malloc3(vmap_width, vmap_height, sizeof(char));
+ if(vmap == NULL)
+ {
+ pm_error( "Cannot allocate memory" );
+diff -up netpbm-10.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
@@ -277,6 +277,7 @@ main(int argc, char *argv[]) {
if (flagbyte == 7) { /* long form preamble */
integer packetlength = get32() ; /* character packet length */
@@ -540,10 +457,10 @@ diff -up netpbm-10.47.04/converter/pbm/pktopbm.c.security netpbm-10.47.04/conver
endofpacket = packetlength + pktopbm_pkloc;
/* calculate end of packet */
if ((car >= MAXPKCHAR) || !filename[car]) {
-diff -up netpbm-10.47.04/converter/pbm/thinkjettopbm.l.security netpbm-10.47.04/converter/pbm/thinkjettopbm.l
---- netpbm-10.47.04/converter/pbm/thinkjettopbm.l.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/thinkjettopbm.l 2009-10-21 15:09:33.000000000 +0200
-@@ -107,7 +107,9 @@ DIG [0-9]
+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
+@@ -114,7 +114,9 @@ DIG [0-9]
<RASTERMODE>\033\*b{DIG}+W {
int l;
if (rowCount >= rowCapacity) {
@@ -553,7 +470,7 @@ diff -up netpbm-10.47.04/converter/pbm/thinkjettopbm.l.security netpbm-10.47.04/
rows = realloc (rows, rowCapacity * sizeof *rows);
if (rows == NULL)
pm_error ("Out of memory.");
-@@ -217,6 +219,8 @@ yywrap (void)
+@@ -226,6 +228,8 @@ yywrap (void)
/*
* Quite simple since ThinkJet bit arrangement matches PBM
*/
@@ -562,20 +479,20 @@ diff -up netpbm-10.47.04/converter/pbm/thinkjettopbm.l.security netpbm-10.47.04/
pbm_writepbminit(stdout, maxRowLength*8, rowCount, 0);
packed_bitrow = malloc(maxRowLength);
-diff -up netpbm-10.47.04/converter/pbm/ybmtopbm.c.security netpbm-10.47.04/converter/pbm/ybmtopbm.c
---- netpbm-10.47.04/converter/pbm/ybmtopbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/pbm/ybmtopbm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -88,6 +88,7 @@ getinit( file, colsP, rowsP, depthP, pad
- pm_error( "EOF / read error" );
+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
+@@ -49,6 +49,7 @@ getinit(FILE * const ifP,
+ pm_error("EOF / read error");
*depthP = 1;
+ overflow_add(*colsP, 15);
- *padrightP = ( ( *colsP + 15 ) / 16 ) * 16 - *colsP;
- bitsperitem = 0;
- }
-diff -up netpbm-10.47.04/converter/pgm/lispmtopgm.c.security netpbm-10.47.04/converter/pgm/lispmtopgm.c
---- netpbm-10.47.04/converter/pgm/lispmtopgm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/pgm/lispmtopgm.c 2009-10-21 15:09:33.000000000 +0200
+ *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
@@ -58,6 +58,7 @@ main( argc, argv )
pm_error( "depth (%d bits) is too large", depth);
@@ -595,9 +512,9 @@ diff -up netpbm-10.47.04/converter/pgm/lispmtopgm.c.security netpbm-10.47.04/con
*padrightP = ( ( *colsP + 31 ) / 32 ) * 32 - *colsP;
if ( *colsP != (cols_32 - *padrightP) ) {
-diff -up netpbm-10.47.04/converter/pgm/psidtopgm.c.security netpbm-10.47.04/converter/pgm/psidtopgm.c
---- netpbm-10.47.04/converter/pgm/psidtopgm.c.security 2009-10-21 13:39:06.000000000 +0200
-+++ netpbm-10.47.04/converter/pgm/psidtopgm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -78,6 +78,7 @@ main(int argc,
pm_error("bits/sample (%d) is too large.", bitspersample);
@@ -606,10 +523,10 @@ diff -up netpbm-10.47.04/converter/pgm/psidtopgm.c.security netpbm-10.47.04/conv
grayrow = pgm_allocrow((cols + 7) / 8 * 8);
for (row = 0; row < rows; ++row) {
unsigned int col;
-diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/converter/ppm/ilbmtoppm.c
---- netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ilbmtoppm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -594,6 +594,7 @@ decode_row(FILE * const ifP,
+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
+@@ -592,6 +592,7 @@ decode_row(FILE * const ifP,
rawtype *chp;
cols = bmhdP->w;
@@ -617,7 +534,7 @@ diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/conv
bytes = RowBytes(cols);
for( plane = 0; plane < nPlanes; plane++ ) {
int mask;
-@@ -681,6 +682,23 @@ decode_mask(FILE * const ifP,
+@@ -679,6 +680,23 @@ decode_mask(FILE * const ifP,
Multipalette handling
****************************************************************************/
@@ -641,7 +558,7 @@ diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/conv
static void
multi_adjust(cmap, row, palchange)
-@@ -1300,6 +1318,9 @@ dcol_to_ppm(FILE * const ifP,
+@@ -1341,6 +1359,9 @@ dcol_to_ppm(FILE * const ifP,
if( redmaxval != maxval || greenmaxval != maxval || bluemaxval != maxval )
pm_message("scaling colors to %d bits", pm_maxvaltobits(maxval));
@@ -651,7 +568,7 @@ diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/conv
MALLOCARRAY_NOFAIL(redtable, redmaxval +1);
MALLOCARRAY_NOFAIL(greentable, greenmaxval +1);
MALLOCARRAY_NOFAIL(bluetable, bluemaxval +1);
-@@ -1729,7 +1750,9 @@ PCHG_ConvertSmall(PCHG, cmap, mask, data
+@@ -1763,7 +1784,9 @@ PCHG_ConvertSmall(PCHG, cmap, mask, data
ChangeCount32 = *data++;
datasize -= 2;
@@ -661,7 +578,7 @@ diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/conv
for( i = 0; i < changes; i++ ) {
if( totalchanges >= PCHG->TotalChanges ) goto fail;
if( datasize < 2 ) goto fail;
-@@ -1994,6 +2017,9 @@ read_pchg(FILE * const ifp,
+@@ -2028,6 +2051,9 @@ read_pchg(FILE * const ifp,
cmap->mp_change[i] = NULL;
if( PCHG.StartLine < 0 ) {
int nch;
@@ -671,7 +588,7 @@ diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/conv
nch = PCHG.MaxReg - PCHG.MinReg +1;
MALLOCARRAY_NOFAIL(cmap->mp_init, nch + 1);
for( i = 0; i < nch; i++ )
-@@ -2070,6 +2096,7 @@ process_body( FILE * const ifp,
+@@ -2104,6 +2130,7 @@ process_body( FILE * const ifp,
if( typeid == ID_ILBM ) {
int isdeep;
@@ -679,9 +596,9 @@ diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/conv
MALLOCARRAY_NOFAIL(ilbmrow, RowBytes(bmhdP->w));
*viewportmodesP |= fakeviewport; /* -isham/-isehb */
-diff -up netpbm-10.47.04/converter/ppm/imgtoppm.c.security netpbm-10.47.04/converter/ppm/imgtoppm.c
---- netpbm-10.47.04/converter/ppm/imgtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/imgtoppm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -84,6 +84,7 @@ main(int argc, char ** argv) {
len = atoi((char*) buf );
if ( fread( buf, len, 1, ifp ) != 1 )
@@ -698,22 +615,22 @@ diff -up netpbm-10.47.04/converter/ppm/imgtoppm.c.security netpbm-10.47.04/conve
if ( len != cols * rows )
pm_message(
"pixel data length (%d) does not match image size (%d)",
-diff -up netpbm-10.47.04/converter/ppm/Makefile.security netpbm-10.47.04/converter/ppm/Makefile
---- netpbm-10.47.04/converter/ppm/Makefile.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/Makefile 2009-10-21 15:09:33.000000000 +0200
+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
@@ -11,7 +11,7 @@ SUBDIRS = hpcdtoppm ppmtompeg
PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \
leaftoppm mtvtoppm neotoppm \
- pcxtoppm pc1toppm pi1toppm picttoppm pjtoppm \
+ pcxtoppm pc1toppm pi1toppm pjtoppm \
- ppmtoacad ppmtoarbtxt \
+ ppmtoacad ppmtoapplevol ppmtoarbtxt ppmtoascii \
ppmtobmp ppmtoeyuv ppmtogif ppmtoicr ppmtoilbm \
ppmtoleaf ppmtolj ppmtomitsu ppmtoneo \
-diff -up netpbm-10.47.04/converter/ppm/pcxtoppm.c.security netpbm-10.47.04/converter/ppm/pcxtoppm.c
---- netpbm-10.47.04/converter/ppm/pcxtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/pcxtoppm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -409,6 +409,7 @@ pcx_planes_to_pixels(pixels, bitplanes,
+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
+@@ -409,6 +409,7 @@ pcx_planes_to_pixels(pixels, bitplanes,
/*
* clear the pixel buffer
*/
@@ -729,18 +646,18 @@ diff -up netpbm-10.47.04/converter/ppm/pcxtoppm.c.security netpbm-10.47.04/conve
rawcols = BytesPerLine * 8 / BitsPerPixel;
if (headerCols > rawcols) {
pm_message("warning - BytesPerLine = %d, "
-diff -up netpbm-10.47.04/converter/ppm/picttoppm.c.security netpbm-10.47.04/converter/ppm/picttoppm.c
---- netpbm-10.47.04/converter/ppm/picttoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/picttoppm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -1,3 +1,5 @@
+#error "Unfixable. Don't ship me"
+
/*
* picttoppm.c -- convert a MacIntosh PICT file to PPM format.
*
-diff -up netpbm-10.47.04/converter/ppm/pjtoppm.c.security netpbm-10.47.04/converter/ppm/pjtoppm.c
---- netpbm-10.47.04/converter/ppm/pjtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/pjtoppm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -127,19 +127,21 @@ main(argc, argv)
case 'V': /* send plane */
case 'W': /* send last plane */
@@ -790,9 +707,9 @@ diff -up netpbm-10.47.04/converter/ppm/pjtoppm.c.security netpbm-10.47.04/conver
cols *= 8;
}
-diff -up netpbm-10.47.04/converter/ppm/ppmtoeyuv.c.security netpbm-10.47.04/converter/ppm/ppmtoeyuv.c
---- netpbm-10.47.04/converter/ppm/ppmtoeyuv.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtoeyuv.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -114,6 +114,7 @@ create_multiplication_tables(const pixva
int index;
@@ -801,9 +718,9 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoeyuv.c.security netpbm-10.47.04/conv
MALLOCARRAY_NOFAIL(mult299 , maxval+1);
MALLOCARRAY_NOFAIL(mult587 , maxval+1);
MALLOCARRAY_NOFAIL(mult114 , maxval+1);
-diff -up netpbm-10.47.04/converter/ppm/ppmtoicr.c.security netpbm-10.47.04/converter/ppm/ppmtoicr.c
---- netpbm-10.47.04/converter/ppm/ppmtoicr.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtoicr.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -169,7 +169,7 @@ char* argv[];
if (rleflag) {
@@ -813,10 +730,10 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoicr.c.security netpbm-10.47.04/conve
p = testimage;
for (i=0; i<rows; i++)
for (j=0; j<cols; j++)
-diff -up netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security netpbm-10.47.04/converter/ppm/ppmtoilbm.c
---- netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtoilbm.c 2009-10-21 15:47:50.000000000 +0200
-@@ -1214,6 +1214,7 @@ ppm_to_rgb8(ifP, cols, rows, maxval)
+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
+@@ -1220,6 +1220,7 @@ ppm_to_rgb8(ifP, cols, rows, maxval)
maskmethod = 0; /* no masking - RGB8 uses genlock bits */
compmethod = 4; /* RGB8 files are always compressed */
@@ -824,7 +741,7 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security netpbm-10.47.04/conv
MALLOCARRAY_NOFAIL(compr_row, cols * 4);
if( maxval != 255 ) {
-@@ -1302,6 +1303,7 @@ ppm_to_rgbn(ifP, cols, rows, maxval)
+@@ -1308,6 +1309,7 @@ ppm_to_rgbn(ifP, cols, rows, maxval)
maskmethod = 0; /* no masking - RGBN uses genlock bits */
compmethod = 4; /* RGBN files are always compressed */
@@ -832,7 +749,7 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security netpbm-10.47.04/conv
MALLOCARRAY_NOFAIL(compr_row, cols * 2);
if( maxval != 15 ) {
-@@ -1779,6 +1781,7 @@ make_val_table(oldmaxval, newmaxval)
+@@ -1785,6 +1787,7 @@ make_val_table(oldmaxval, newmaxval)
unsigned int i;
int * table;
@@ -840,7 +757,7 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security netpbm-10.47.04/conv
MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
for (i = 0; i <= oldmaxval; ++i)
table[i] = ROUNDDIV(i * newmaxval, oldmaxval);
-@@ -2283,8 +2286,11 @@ main(int argc, char ** argv) {
+@@ -2293,8 +2296,11 @@ main(int argc, char ** argv) {
MALLOCARRAY_NOFAIL(coded_rowbuf, RowBytes(cols));
for (i = 0; i < RowBytes(cols); ++i)
coded_rowbuf[i] = 0;
@@ -853,9 +770,9 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security netpbm-10.47.04/conv
}
switch (mode) {
-diff -up netpbm-10.47.04/converter/ppm/ppmtolj.c.security netpbm-10.47.04/converter/ppm/ppmtolj.c
---- netpbm-10.47.04/converter/ppm/ppmtolj.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtolj.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -181,7 +181,8 @@ int main(int argc, char *argv[]) {
ppm_readppminit( ifp, &cols, &rows, &maxval, &format );
@@ -866,9 +783,9 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtolj.c.security netpbm-10.47.04/conver
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.47.04/converter/ppm/ppmtomitsu.c.security netpbm-10.47.04/converter/ppm/ppmtomitsu.c
---- netpbm-10.47.04/converter/ppm/ppmtomitsu.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtomitsu.c 2009-10-21 15:48:30.000000000 +0200
+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
@@ -685,6 +685,8 @@ main(int argc, char * argv[]) {
medias = MSize_User;
@@ -878,9 +795,9 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtomitsu.c.security netpbm-10.47.04/con
medias.maxcols *= 2;
medias.maxrows *= 2;
}
-diff -up netpbm-10.47.04/converter/ppm/ppmtopcx.c.security netpbm-10.47.04/converter/ppm/ppmtopcx.c
---- netpbm-10.47.04/converter/ppm/ppmtopcx.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtopcx.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -419,6 +419,8 @@ ppmTo16ColorPcx(pixel ** cons
else Planes = 1;
}
@@ -890,21 +807,21 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtopcx.c.security netpbm-10.47.04/conve
BytesPerLine = ((cols * BitsPerPixel) + 7) / 8;
MALLOCARRAY_NOFAIL(indexRow, cols);
MALLOCARRAY_NOFAIL(planesrow, BytesPerLine);
-diff -up netpbm-10.47.04/converter/ppm/ppmtopict.c.security netpbm-10.47.04/converter/ppm/ppmtopict.c
---- netpbm-10.47.04/converter/ppm/ppmtopict.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtopict.c 2009-10-21 15:09:33.000000000 +0200
-@@ -245,6 +245,8 @@ char *argv[];
- putShort(stdout, 0); /* mode */
-
- /* Finally, write out the data. */
-+ overflow_add(cols/MAX_COUNT, 1);
-+ overflow_add(cols, cols/MAX_COUNT+1);
- packed = (char*) malloc((unsigned)(cols+cols/MAX_COUNT+1));
- oc = 0;
- for (row = 0; row < rows; row++)
-diff -up netpbm-10.47.04/converter/ppm/ppmtopj.c.security netpbm-10.47.04/converter/ppm/ppmtopj.c
---- netpbm-10.47.04/converter/ppm/ppmtopj.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtopj.c 2009-10-21 15:09:33.000000000 +0200
+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
+@@ -441,6 +441,8 @@ main(int argc, const char ** argv) {
+ putShort(stdout, 0); /* mode */
+
+ /* Finally, write out the data. */
++ overflow_add(cols/MAX_COUNT, 1);
++ overflow_add(cols, cols/MAX_COUNT+1);
+ 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
@@ -179,6 +179,7 @@ char *argv[];
pixels = ppm_readppm( ifp, &cols, &rows, &maxval );
@@ -913,9 +830,9 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtopj.c.security netpbm-10.47.04/conver
obuf = (unsigned char *) pm_allocrow(cols, sizeof(unsigned char));
cbuf = (unsigned char *) pm_allocrow(cols * 2, sizeof(unsigned char));
-diff -up netpbm-10.47.04/converter/ppm/ppmtopjxl.c.security netpbm-10.47.04/converter/ppm/ppmtopjxl.c
---- netpbm-10.47.04/converter/ppm/ppmtopjxl.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtopjxl.c 2009-10-21 15:43:31.000000000 +0200
+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
@@ -276,6 +276,8 @@ main(int argc, const char * argv[]) {
pm_error("image too large; reduce with ppmscale");
if (maxval > PCL_MAXVAL)
@@ -948,9 +865,9 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtopjxl.c.security netpbm-10.47.04/conv
inrow = (char *)malloc((unsigned)bpp);
outrow = (char *)malloc((unsigned)bpp*2);
runcnt = (signed char *)malloc((unsigned)bpp);
-diff -up netpbm-10.47.04/converter/ppm/ppmtowinicon.c.security netpbm-10.47.04/converter/ppm/ppmtowinicon.c
---- netpbm-10.47.04/converter/ppm/ppmtowinicon.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtowinicon.c 2009-10-21 15:44:54.000000000 +0200
+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
@@ -12,6 +12,7 @@
#include <math.h>
@@ -994,10 +911,10 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtowinicon.c.security netpbm-10.47.04/c
entry->size_in_bytes =
xorBitmap->size + andBitmap->size + 40 + (4 * entry->color_count);
if (verbose)
-diff -up netpbm-10.47.04/converter/ppm/ppmtoxpm.c.security netpbm-10.47.04/converter/ppm/ppmtoxpm.c
---- netpbm-10.47.04/converter/ppm/ppmtoxpm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ppmtoxpm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -197,6 +197,7 @@ genNumstr(unsigned int const input, int
+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
+@@ -197,6 +197,7 @@ genNumstr(unsigned int const input, int
unsigned int i;
/* Allocate memory for printed number. Abort if error. */
@@ -1005,7 +922,7 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoxpm.c.security netpbm-10.47.04/conve
if (!(str = (char *) malloc(digits + 1)))
pm_error("out of memory");
-@@ -314,6 +315,7 @@ genCmap(colorhist_vector const chv,
+@@ -314,6 +315,7 @@ genCmap(colorhist_vector const chv,
unsigned int charsPerPixel;
unsigned int xpmMaxval;
@@ -1013,9 +930,9 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtoxpm.c.security netpbm-10.47.04/conve
MALLOCARRAY(cmap, cmapSize);
if (cmapP == NULL)
pm_error("Out of memory allocating %u bytes for a color map.",
-diff -up netpbm-10.47.04/converter/ppm/qrttoppm.c.security netpbm-10.47.04/converter/ppm/qrttoppm.c
---- netpbm-10.47.04/converter/ppm/qrttoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/qrttoppm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -46,7 +46,7 @@ main( argc, argv )
ppm_writeppminit( stdout, cols, rows, maxval, 0 );
@@ -1025,9 +942,9 @@ diff -up netpbm-10.47.04/converter/ppm/qrttoppm.c.security netpbm-10.47.04/conve
if ( buf == (unsigned char *) 0 )
pm_error( "out of memory" );
-diff -up netpbm-10.47.04/converter/ppm/sldtoppm.c.security netpbm-10.47.04/converter/ppm/sldtoppm.c
---- netpbm-10.47.04/converter/ppm/sldtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/sldtoppm.c 2009-10-21 15:44:11.000000000 +0200
+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
@@ -455,6 +455,8 @@ slider(slvecfn slvec,
/* Allocate image buffer and clear it to black. */
@@ -1037,9 +954,9 @@ diff -up netpbm-10.47.04/converter/ppm/sldtoppm.c.security netpbm-10.47.04/conve
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.47.04/converter/ppm/ximtoppm.c.security netpbm-10.47.04/converter/ppm/ximtoppm.c
---- netpbm-10.47.04/converter/ppm/ximtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/ximtoppm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -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);
@@ -1072,10 +989,10 @@ diff -up netpbm-10.47.04/converter/ppm/ximtoppm.c.security netpbm-10.47.04/conve
header->colors = (Color *)calloc((unsigned int)header->ncolors,
sizeof(Color));
if (header->colors == NULL) {
-diff -up netpbm-10.47.04/converter/ppm/xpmtoppm.c.security netpbm-10.47.04/converter/ppm/xpmtoppm.c
---- netpbm-10.47.04/converter/ppm/xpmtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/xpmtoppm.c 2009-10-21 15:09:33.000000000 +0200
-@@ -701,6 +701,7 @@ ReadXPMFile(FILE * const stream, int * c
+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 */
}
@@ -1083,9 +1000,9 @@ diff -up netpbm-10.47.04/converter/ppm/xpmtoppm.c.security netpbm-10.47.04/conve
totalpixels = *widthP * *heightP;
MALLOCARRAY(*dataP, totalpixels);
if (*dataP == NULL)
-diff -up netpbm-10.47.04/converter/ppm/yuvtoppm.c.security netpbm-10.47.04/converter/ppm/yuvtoppm.c
---- netpbm-10.47.04/converter/ppm/yuvtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
-+++ netpbm-10.47.04/converter/ppm/yuvtoppm.c 2009-10-21 15:09:33.000000000 +0200
+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
@@ -72,6 +72,7 @@ main(argc, argv)
ppm_writeppminit(stdout, cols, rows, (pixval) 255, 0);
@@ -1094,9 +1011,9 @@ diff -up netpbm-10.47.04/converter/ppm/yuvtoppm.c.security netpbm-10.47.04/conve
MALLOCARRAY(yuvbuf, (cols+1)/2);
if (yuvbuf == NULL)
pm_error("Unable to allocate YUV buffer for %d columns.", cols);
-diff -up netpbm-10.47.04/editor/pamcut.c.security netpbm-10.47.04/editor/pamcut.c
---- netpbm-10.47.04/editor/pamcut.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pamcut.c 2009-10-21 15:29:36.000000000 +0200
+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
@@ -655,6 +655,8 @@ cutOneImage(FILE * const ifP
outpam = inpam; /* Initial value -- most fields should be same */
@@ -1106,20 +1023,10 @@ diff -up netpbm-10.47.04/editor/pamcut.c.security netpbm-10.47.04/editor/pamcut.
outpam.width = rightcol - leftcol + 1;
outpam.height = bottomrow - toprow + 1;
-diff -up netpbm-10.47.04/editor/pbmpscale.c.security netpbm-10.47.04/editor/pbmpscale.c
---- netpbm-10.47.04/editor/pbmpscale.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pbmpscale.c 2009-10-21 15:27:21.000000000 +0200
-@@ -110,6 +110,7 @@ main(int argc, char ** argv) {
- inrow[0] = inrow[1] = inrow[2] = NULL;
- pbm_readpbminit(ifP, &columns, &rows, &format) ;
-
-+ overflow2(columns, scale);
- outrow = pbm_allocrow(columns*scale) ;
- MALLOCARRAY(flags, columns);
- if (flags == NULL)
-diff -up netpbm-10.47.04/editor/pbmreduce.c.security netpbm-10.47.04/editor/pbmreduce.c
---- netpbm-10.47.04/editor/pbmreduce.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pbmreduce.c 2009-10-21 15:26:13.000000000 +0200
+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
@@ -94,6 +94,7 @@ main( argc, argv )
if (halftone == QT_FS) {
unsigned int col;
@@ -1128,10 +1035,10 @@ diff -up netpbm-10.47.04/editor/pbmreduce.c.security netpbm-10.47.04/editor/pbmr
MALLOCARRAY(thiserr, newcols + 2);
MALLOCARRAY(nexterr, newcols + 2);
if (thiserr == NULL || nexterr == NULL)
-diff -up netpbm-10.47.04/editor/pnmgamma.c.security netpbm-10.47.04/editor/pnmgamma.c
---- netpbm-10.47.04/editor/pnmgamma.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pnmgamma.c 2009-10-21 15:09:34.000000000 +0200
-@@ -586,6 +586,7 @@ createGammaTables(enum transferFunction
+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
+@@ -586,6 +586,7 @@ createGammaTables(enum transferFunction
xelval ** const btableP) {
/* Allocate space for the tables. */
@@ -1139,9 +1046,9 @@ diff -up netpbm-10.47.04/editor/pnmgamma.c.security netpbm-10.47.04/editor/pnmga
MALLOCARRAY(*rtableP, maxval+1);
MALLOCARRAY(*gtableP, maxval+1);
MALLOCARRAY(*btableP, maxval+1);
-diff -up netpbm-10.47.04/editor/pnmhisteq.c.security netpbm-10.47.04/editor/pnmhisteq.c
---- netpbm-10.47.04/editor/pnmhisteq.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pnmhisteq.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -103,6 +103,7 @@ computeLuminosityHistogram(xel * const *
unsigned int pixelCount;
unsigned int * lumahist;
@@ -1150,9 +1057,9 @@ diff -up netpbm-10.47.04/editor/pnmhisteq.c.security netpbm-10.47.04/editor/pnmh
MALLOCARRAY(lumahist, maxval + 1);
if (lumahist == NULL)
pm_error("Out of storage allocating array for %u histogram elements",
-diff -up netpbm-10.47.04/editor/pnmindex.csh.security netpbm-10.47.04/editor/pnmindex.csh
---- netpbm-10.47.04/editor/pnmindex.csh.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pnmindex.csh 2009-10-21 15:09:34.000000000 +0200
+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
@@ -1,5 +1,8 @@
#!/bin/csh -f
#
@@ -1162,9 +1069,9 @@ diff -up netpbm-10.47.04/editor/pnmindex.csh.security netpbm-10.47.04/editor/pnm
# pnmindex - build a visual index of a bunch of anymaps
#
# Copyright (C) 1991 by Jef Poskanzer.
-diff -up netpbm-10.47.04/editor/pnmpad.c.security netpbm-10.47.04/editor/pnmpad.c
---- netpbm-10.47.04/editor/pnmpad.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pnmpad.c 2009-10-21 15:33:51.000000000 +0200
+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
@@ -527,6 +527,8 @@ main(int argc, const char ** argv) {
computePadSizes(cmdline, cols, rows, &lpad, &rpad, &tpad, &bpad);
@@ -1174,11 +1081,10 @@ diff -up netpbm-10.47.04/editor/pnmpad.c.security netpbm-10.47.04/editor/pnmpad.
newcols = cols + lpad + rpad;
if (PNM_FORMAT_TYPE(format) == PBM_TYPE)
-diff -up netpbm-10.47.04/editor/pnmpaste.c.security netpbm-10.47.04/editor/pnmpaste.c
-diff -up netpbm-10.47.04/editor/pnmremap.c.security netpbm-10.47.04/editor/pnmremap.c
---- netpbm-10.47.04/editor/pnmremap.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pnmremap.c 2009-10-21 15:28:20.000000000 +0200
-@@ -408,7 +408,7 @@ initFserr(struct pam * const pamP,
+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
+@@ -409,7 +409,7 @@ initFserr(struct pam * const pamP,
unsigned int plane;
unsigned int const fserrSize = pamP->width + 2;
@@ -1187,7 +1093,7 @@ diff -up netpbm-10.47.04/editor/pnmremap.c.security netpbm-10.47.04/editor/pnmre
fserrP->width = pamP->width;
MALLOCARRAY(fserrP->thiserr, pamP->depth);
-@@ -444,6 +444,7 @@ floydInitRow(struct pam * const pamP, st
+@@ -445,6 +445,7 @@ floydInitRow(struct pam * const pamP, st
int col;
@@ -1195,10 +1101,10 @@ diff -up netpbm-10.47.04/editor/pnmremap.c.security netpbm-10.47.04/editor/pnmre
for (col = 0; col < pamP->width + 2; ++col) {
unsigned int plane;
for (plane = 0; plane < pamP->depth; ++plane)
-diff -up netpbm-10.47.04/editor/pnmscalefixed.c.security netpbm-10.47.04/editor/pnmscalefixed.c
---- netpbm-10.47.04/editor/pnmscalefixed.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pnmscalefixed.c 2009-10-21 15:09:34.000000000 +0200
-@@ -211,6 +211,8 @@ compute_output_dimensions(const struct c
+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
+@@ -214,6 +214,8 @@ compute_output_dimensions(const struct c
const int rows, const int cols,
int * newrowsP, int * newcolsP) {
@@ -1207,7 +1113,7 @@ diff -up netpbm-10.47.04/editor/pnmscalefixed.c.security netpbm-10.47.04/editor/
if (cmdline.pixels) {
if (rows * cols <= cmdline.pixels) {
*newrowsP = rows;
-@@ -262,6 +264,8 @@ compute_output_dimensions(const struct c
+@@ -265,6 +267,8 @@ compute_output_dimensions(const struct c
if (*newcolsP < 1) *newcolsP = 1;
if (*newrowsP < 1) *newrowsP = 1;
@@ -1216,7 +1122,7 @@ diff -up netpbm-10.47.04/editor/pnmscalefixed.c.security netpbm-10.47.04/editor/
}
-@@ -443,6 +447,9 @@ main(int argc, char **argv ) {
+@@ -446,6 +450,9 @@ main(int argc, char **argv ) {
unfilled. We can address that by stretching, whereas the other
case would require throwing away some of the input.
*/
@@ -1226,9 +1132,9 @@ diff -up netpbm-10.47.04/editor/pnmscalefixed.c.security netpbm-10.47.04/editor/
sxscale = SCALE * newcols / cols;
syscale = SCALE * newrows / rows;
-diff -up netpbm-10.47.04/editor/pnmshear.c.security netpbm-10.47.04/editor/pnmshear.c
---- netpbm-10.47.04/editor/pnmshear.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/pnmshear.c 2009-10-21 15:31:26.000000000 +0200
+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
@@ -15,6 +15,7 @@
#include <assert.h>
#include <math.h>
@@ -1249,32 +1155,25 @@ diff -up netpbm-10.47.04/editor/pnmshear.c.security netpbm-10.47.04/editor/pnmsh
newcols = rows * shearfac + cols + 0.999999;
pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0);
-diff -up netpbm-10.47.04/editor/ppmdither.c.security netpbm-10.47.04/editor/ppmdither.c
---- netpbm-10.47.04/editor/ppmdither.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/editor/ppmdither.c 2009-10-21 15:09:34.000000000 +0200
-@@ -111,6 +111,9 @@ dith_matrix(unsigned int const dith_dim)
- (dith_dim * sizeof(int *)) + /* pointers */
- (dith_dim * dith_dim * sizeof(int)); /* data */
-
-+ overflow2(dith_dim, sizeof(int *));
-+ overflow3(dith_dim, dith_dim, sizeof(int));
-+ overflow_add(dith_dim * sizeof(int *), dith_dim * dith_dim * sizeof(int));
- dith_mat = (unsigned int **) malloc(dith_mat_sz);
-
- if (dith_mat == NULL)
-@@ -165,7 +168,8 @@ dith_setup(const unsigned int dith_power
- if (dith_nb < 2)
- pm_error("too few shades for blue, minimum of 2");
-
-- MALLOCARRAY(*colormapP, dith_nr * dith_ng * dith_nb);
-+ overflow2(dith_nr, dith_ng);
-+ *colormapP = malloc3(dith_nr * dith_ng, dith_nb, sizeof(pixel));
- if (*colormapP == NULL)
- pm_error("Unable to allocate space for the color lookup table "
- "(%d by %d by %d pixels).", dith_nr, dith_ng, dith_nb);
-diff -up netpbm-10.47.04/editor/specialty/pamoil.c.security netpbm-10.47.04/editor/specialty/pamoil.c
---- netpbm-10.47.04/editor/specialty/pamoil.c.security 2009-10-21 13:38:56.000000000 +0200
-+++ netpbm-10.47.04/editor/specialty/pamoil.c 2009-10-21 15:09:33.000000000 +0200
+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
+@@ -355,7 +355,11 @@ dithMatrix(unsigned int const dithPower)
+ unsigned int const dithMatSize =
+ (dithDim * sizeof(*dithMat)) + /* pointers */
+ (dithDim * dithDim * sizeof(**dithMat)); /* data */
+-
++
++ overflow2(dithDim, sizeof(*dithMat));
++ overflow3(dithDim, dithDim, sizeof(**dithMat));
++ overflow_add(dithDim * sizeof(*dithMat), dithDim * dithDim * sizeof(**dithMat));
++
+ dithMat = malloc(dithMatSize);
+
+ if (dithMat == NULL)
+diff -up netpbm-10.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
@@ -112,6 +112,7 @@ main(int argc, char *argv[] ) {
tuples = pnm_readpam(ifp, &inpam, PAM_STRUCT_SIZE(tuple_type));
pm_close(ifp);
@@ -1283,22 +1182,10 @@ diff -up netpbm-10.47.04/editor/specialty/pamoil.c.security netpbm-10.47.04/edit
MALLOCARRAY(hist, inpam.maxval + 1);
if (hist == NULL)
pm_error("Unable to allocate memory for histogram.");
-diff -up netpbm-10.47.04/generator/pbmpage.c.security netpbm-10.47.04/generator/pbmpage.c
---- netpbm-10.47.04/generator/pbmpage.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/generator/pbmpage.c 2009-10-21 15:09:34.000000000 +0200
-@@ -170,6 +170,9 @@ outputPbm(FILE * const file,
- /* We round the allocated row space up to a multiple of 8 so the ugly
- fast code below can work.
- */
-+
-+ overflow_add(bitmap.Width, 7);
-+
- pbmrow = pbm_allocrow(((bitmap.Width+7)/8)*8);
-
- bitmap_cursor = 0;
-diff -up netpbm-10.47.04/generator/pbmtext.c.security netpbm-10.47.04/generator/pbmtext.c
---- netpbm-10.47.04/generator/pbmtext.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/generator/pbmtext.c 2009-10-21 15:23:15.000000000 +0200
+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
@@ -96,12 +96,14 @@ parseCommandLine(int argc, const char **
for (i = 1; i < argc; ++i) {
@@ -1314,15 +1201,15 @@ diff -up netpbm-10.47.04/generator/pbmtext.c.security netpbm-10.47.04/generator/
totaltextsize += strlen(argv[i]);
text = realloc(text, totaltextsize);
if (text == NULL)
-@@ -711,6 +713,7 @@ getText(const char cmdline_text
+@@ -712,6 +714,7 @@ getText(const char cmdline_text
pm_error("A line of input text is longer than %u characters."
- "Cannot process.", sizeof(buf)-1);
+ "Cannot process.", (unsigned)sizeof(buf)-1);
if (lineCount >= maxlines) {
-+ overflow2(maxlines, 2);
++ overflow2(maxlines, 2);
maxlines *= 2;
REALLOCARRAY(text_array, maxlines);
if (text_array == NULL)
-@@ -831,6 +834,7 @@ main(int argc, const char *argv[]) {
+@@ -832,6 +835,7 @@ main(int argc, const char *argv[]) {
hmargin = fontP->maxwidth;
} else {
vmargin = fontP->maxheight;
@@ -1330,9 +1217,9 @@ diff -up netpbm-10.47.04/generator/pbmtext.c.security netpbm-10.47.04/generator/
hmargin = 2 * fontP->maxwidth;
}
}
-diff -up netpbm-10.47.04/generator/pgmcrater.c.security netpbm-10.47.04/generator/pgmcrater.c
---- netpbm-10.47.04/generator/pgmcrater.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/generator/pgmcrater.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -130,7 +130,7 @@ static void gencraters()
/* Acquire the elevation array and initialize it to mean
surface elevation. */
@@ -1342,9 +1229,9 @@ diff -up netpbm-10.47.04/generator/pgmcrater.c.security netpbm-10.47.04/generato
if (aux == NULL)
pm_error("out of memory allocating elevation array");
-diff -up netpbm-10.47.04/generator/pgmkernel.c.security netpbm-10.47.04/generator/pgmkernel.c
---- netpbm-10.47.04/generator/pgmkernel.c.security 2009-10-21 13:38:57.000000000 +0200
-+++ netpbm-10.47.04/generator/pgmkernel.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -68,7 +68,7 @@ main ( argc, argv )
kycenter = (fysize - 1) / 2.0;
ixsize = fxsize + 0.999;
@@ -1354,22 +1241,22 @@ diff -up netpbm-10.47.04/generator/pgmkernel.c.security netpbm-10.47.04/generato
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.47.04/lib/libpam.c.security netpbm-10.47.04/lib/libpam.c
---- netpbm-10.47.04/lib/libpam.c.security 2009-10-21 13:39:00.000000000 +0200
-+++ netpbm-10.47.04/lib/libpam.c 2009-10-21 15:09:34.000000000 +0200
-@@ -235,7 +235,8 @@ allocPamRow(const struct pam * const pam
- int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample);
+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
+@@ -220,7 +220,8 @@ allocPamRow(const struct pam * const pam
+ unsigned int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample);
tuple * tuplerow;
- tuplerow = malloc(pamP->width * (sizeof(tuple *) + bytesPerTuple));
+ overflow_add(sizeof(tuple *), bytesPerTuple);
-+ tuplerow = malloc2(pamP->width, sizeof(tuple *) + bytesPerTuple);
++ tuplerow = malloc2(pamP->width, (sizeof(tuple *) + bytesPerTuple));
if (tuplerow != NULL) {
/* Now we initialize the pointers to the individual tuples
-diff -up netpbm-10.47.04/lib/libpammap.c.security netpbm-10.47.04/lib/libpammap.c
---- netpbm-10.47.04/lib/libpammap.c.security 2009-10-21 13:39:00.000000000 +0200
-+++ netpbm-10.47.04/lib/libpammap.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -104,6 +104,8 @@ allocTupleIntListItem(struct pam * const
*/
struct tupleint_list_item * retval;
@@ -1379,9 +1266,9 @@ diff -up netpbm-10.47.04/lib/libpammap.c.security netpbm-10.47.04/lib/libpammap.
unsigned int const size =
sizeof(*retval) - sizeof(retval->tupleint.tuple)
+ pamP->depth * sizeof(sample);
-diff -up netpbm-10.47.04/lib/libpbm1.c.security netpbm-10.47.04/lib/libpbm1.c
---- netpbm-10.47.04/lib/libpbm1.c.security 2009-10-21 13:39:00.000000000 +0200
-+++ netpbm-10.47.04/lib/libpbm1.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -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));
@@ -1390,19 +1277,10 @@ diff -up netpbm-10.47.04/lib/libpbm1.c.security netpbm-10.47.04/lib/libpbm1.c
pm_check(file, check_type, need_raster_size, retval_p);
}
}
-diff -up netpbm-10.47.04/lib/libpbmvms.c.security netpbm-10.47.04/lib/libpbmvms.c
---- netpbm-10.47.04/lib/libpbmvms.c.security 2009-10-21 13:39:00.000000000 +0200
-+++ netpbm-10.47.04/lib/libpbmvms.c 2009-10-21 15:09:34.000000000 +0200
-@@ -1,3 +1,5 @@
-+#warning "NOT AUDITED"
-+
- /***************************************************************************
- This file contains library routines needed to build Netpbm for VMS.
- However, as of 2000.05.26, when these were split out of libpbm1.c
-diff -up netpbm-10.47.04/lib/libpm.c.security netpbm-10.47.04/lib/libpm.c
---- netpbm-10.47.04/lib/libpm.c.security 2009-10-21 13:39:00.000000000 +0200
-+++ netpbm-10.47.04/lib/libpm.c 2009-10-21 15:09:34.000000000 +0200
-@@ -827,4 +827,53 @@ pm_parse_height(const char * const arg)
+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)
}
@@ -1456,10 +1334,10 @@ diff -up netpbm-10.47.04/lib/libpm.c.security netpbm-10.47.04/lib/libpm.c
+ return realloc(a, b*c);
+}
-diff -up netpbm-10.47.04/lib/pm.h.security netpbm-10.47.04/lib/pm.h
---- netpbm-10.47.04/lib/pm.h.security 2009-10-21 13:39:00.000000000 +0200
-+++ netpbm-10.47.04/lib/pm.h 2009-10-21 15:09:34.000000000 +0200
-@@ -377,4 +377,11 @@ pm_parse_height(const char * const arg);
+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);
#endif
@@ -1471,9 +1349,9 @@ diff -up netpbm-10.47.04/lib/pm.h.security netpbm-10.47.04/lib/pm.h
+void overflow_add(int, int);
+
#endif
-diff -up netpbm-10.47.04/other/pnmcolormap.c.security netpbm-10.47.04/other/pnmcolormap.c
---- netpbm-10.47.04/other/pnmcolormap.c.security 2009-10-21 13:38:54.000000000 +0200
-+++ netpbm-10.47.04/other/pnmcolormap.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -840,6 +840,7 @@ colormapToSquare(struct pam * const pamP
pamP->width = intsqrt;
else
@@ -1482,9 +1360,9 @@ diff -up netpbm-10.47.04/other/pnmcolormap.c.security netpbm-10.47.04/other/pnmc
}
{
unsigned int const intQuotient = colormap.size / pamP->width;
-diff -up netpbm-10.47.04/urt/README.security netpbm-10.47.04/urt/README
---- netpbm-10.47.04/urt/README.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/README 2009-10-21 15:09:34.000000000 +0200
+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
@@ -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
@@ -1494,9 +1372,9 @@ diff -up netpbm-10.47.04/urt/README.security netpbm-10.47.04/urt/README
+Removed pipe through and compress support (unsafe)
+
+Alan Cox <alan at redhat.com>
-diff -up netpbm-10.47.04/urt/rle_addhist.c.security netpbm-10.47.04/urt/rle_addhist.c
---- netpbm-10.47.04/urt/rle_addhist.c.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/rle_addhist.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -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,
@@ -1541,9 +1419,9 @@ diff -up netpbm-10.47.04/urt/rle_addhist.c.security netpbm-10.47.04/urt/rle_addh
++length; /*Cater for the null. */
MALLOCARRAY(newc, length);
-diff -up netpbm-10.47.04/urt/rle_getrow.c.security netpbm-10.47.04/urt/rle_getrow.c
---- netpbm-10.47.04/urt/rle_getrow.c.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/rle_getrow.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -17,6 +17,8 @@
*
* Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
@@ -1561,9 +1439,9 @@ diff -up netpbm-10.47.04/urt/rle_getrow.c.security netpbm-10.47.04/urt/rle_getro
evenlen = (comlen + 1) & ~1; /* make it even */
if ( evenlen )
{
-diff -up netpbm-10.47.04/urt/rle_hdr.c.security netpbm-10.47.04/urt/rle_hdr.c
---- netpbm-10.47.04/urt/rle_hdr.c.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/rle_hdr.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -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,
@@ -1630,9 +1508,9 @@ diff -up netpbm-10.47.04/urt/rle_hdr.c.security netpbm-10.47.04/urt/rle_hdr.c
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.47.04/urt/rle.h.security netpbm-10.47.04/urt/rle.h
---- netpbm-10.47.04/urt/rle.h.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/rle.h 2009-10-21 15:09:34.000000000 +0200
+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
@@ -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,
@@ -1661,13 +1539,14 @@ diff -up netpbm-10.47.04/urt/rle.h.security netpbm-10.47.04/urt/rle.h
/* Declare RLE library routines. */
-diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_f.c
---- netpbm-10.47.04/urt/rle_open_f.c.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/rle_open_f.c 2009-10-21 15:15:38.000000000 +0200
-@@ -163,64 +163,7 @@ dealWithSubprocess(const char * const f
+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
+ FILE ** const fpP,
bool * const noSubprocessP,
const char ** const errorP) {
-
+-
-#ifdef NO_OPEN_PIPES
*noSubprocessP = TRUE;
-#else
@@ -1704,11 +1583,11 @@ diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_
- *noSubprocessP = FALSE;
-
- if (*mode == 'w')
-- asprintfN(&command, "compress > %s", file_name);
+- pm_asprintf(&command, "compress > %s", file_name);
- else if (*mode == 'a')
-- asprintfN(&command, "compress >> %s", file_name);
+- pm_asprintf(&command, "compress >> %s", file_name);
- else
-- asprintfN(&command, "compress -d < %s", file_name);
+- pm_asprintf(&command, "compress -d < %s", file_name);
-
- *fpP = my_popen(command, mode, &thepid);
-
@@ -1720,7 +1599,7 @@ diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_
- if (*catchingChildrenP < MAX_CHILDREN)
- pids[(*catchingChildrenP)++] = thepid;
- }
-- strfree(command);
+- pm_strfree(command);
- } else {
- *noSubprocessP = TRUE;
- *errorP = NULL;
@@ -1729,9 +1608,9 @@ diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_
}
-diff -up netpbm-10.47.04/urt/rle_putcom.c.security netpbm-10.47.04/urt/rle_putcom.c
---- netpbm-10.47.04/urt/rle_putcom.c.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/rle_putcom.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -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,
@@ -1757,9 +1636,9 @@ diff -up netpbm-10.47.04/urt/rle_putcom.c.security netpbm-10.47.04/urt/rle_putco
/* 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.47.04/urt/Runput.c.security netpbm-10.47.04/urt/Runput.c
---- netpbm-10.47.04/urt/Runput.c.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/Runput.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -17,6 +17,8 @@
*
* Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
@@ -1792,9 +1671,9 @@ diff -up netpbm-10.47.04/urt/Runput.c.security netpbm-10.47.04/urt/Runput.c
if ( h_cmap == NULL )
{
fprintf( stderr,
-diff -up netpbm-10.47.04/urt/scanargs.c.security netpbm-10.47.04/urt/scanargs.c
---- netpbm-10.47.04/urt/scanargs.c.security 2009-10-21 13:39:11.000000000 +0200
-+++ netpbm-10.47.04/urt/scanargs.c 2009-10-21 15:09:34.000000000 +0200
+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
@@ -38,6 +38,8 @@
*
* Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
diff --git a/netpbm.spec b/netpbm.spec
index f5614b2..e360c88 100644
--- a/netpbm.spec
+++ b/netpbm.spec
@@ -1,13 +1,13 @@
Summary: A library for handling different graphics file formats
Name: netpbm
-Version: 10.47.32
+Version: 10.56.03
Release: 1%{?dist}
# See copyright_summary for details
License: BSD and GPLv2 and IJG and MIT and Public Domain
Group: System Environment/Libraries
URL: http://netpbm.sourceforge.net/
# Source0 is prepared by
-# svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/stable netpbm-%{version}
+# svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced netpbm-%{version}
# svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/userguide netpbm-%{version}/userguide
# and removing the .svn directories ( find -name "\.svn" -type d -print0 | xargs -0 rm -rf )
# and removing the ppmtompeg code, due to patents ( rm -rf netpbm-%{version}/converter/ppm/ppmtompeg/ )
@@ -24,19 +24,15 @@ Patch9: netpbm-xwdfix.patch
Patch11: netpbm-multilib.patch
Patch12: netpbm-pamscale.patch
Patch13: netpbm-glibc.patch
-Patch14: netpbm-svgtopam.patch
Patch15: netpbm-docfix.patch
Patch16: netpbm-ppmfadeusage.patch
Patch17: netpbm-fiasco-overflow.patch
-Patch18: netpbm-lz.patch
-Patch19: netpbm-pnmmontagefix.patch
Patch20: netpbm-noppmtompeg.patch
Patch21: netpbm-cmuwtopbm.patch
Patch22: netpbm-pamtojpeg2k.patch
Patch23: netpbm-manfix.patch
-Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
-BuildRequires: libX11-devel, python, jasper-devel
+BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel
%description
The netpbm package contains a library of functions which support
@@ -98,14 +94,10 @@ netpbm-doc. You'll also need to install the netpbm-progs package.
%patch8 -p1 -b .CAN-2005-2471
%patch9 -p1 -b .xwdfix
%patch11 -p1 -b .multilib
-%patch12 -p1 -b .pamscale
%patch13 -p1 -b .glibc
-%patch14 -p1 -b .svgtopam
%patch15 -p1
%patch16 -p1 -b .ppmfadeusage
%patch17 -p1 -b .fiasco-overflow
-%patch18 -p1 -b .lz
-%patch19 -p1 -b .pnmmmontagefix
%patch20 -p1 -b .noppmtompeg
%patch21 -p1 -b .cmuwtopbmfix
%patch22 -p1 -b .pamtojpeg2kfix
@@ -253,9 +245,9 @@ rm -rf $RPM_BUILD_ROOT
%doc userguide/*
%changelog
-* Wed Nov 09 2011 Jindrich Novy <jnovy at redhat.com> 10.47.32-1
-- update to 10.47.32
-- fixes -multiply option of pamarith
+* Fri Nov 11 2011 Jindrich Novy <jnovy at redhat.com> 10.56.03-1
+- update to 10.56.03
+- fixes compilation against new libpng
* Tue Sep 27 2011 Jindrich Novy <jnovy at redhat.com> 10.47.31-1
- update to 10.47.31
diff --git a/sources b/sources
index f6824f2..550a8f7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6fb3d194731ac93f18a3929af1e31109 netpbm-10.47.32.tar.xz
+da157502bc0d2469391fceed0779634a netpbm-10.56.03.tar.xz
More information about the scm-commits
mailing list