[netpbm] Update new upstream version (#1063264)

Petr Hracek phracek at fedoraproject.org
Mon May 26 09:50:52 UTC 2014


commit 987d88417fbd5c91585f4ec02087bdb08ace1ac0
Author: Petr Hracek <phracek at redhat.com>
Date:   Fri May 16 14:52:51 2014 +0200

    Update new upstream version (#1063264)

 .gitignore                       |    1 +
 netpbm-compare-same-images.patch |   23 -
 netpbm-disable-pbmtog3.patch     |   13 +
 netpbm-man-repeated.patch        |  323 --------
 netpbm-manual-pages.patch        | 1646 --------------------------------------
 netpbm-more-files.patch          |   18 -
 netpbm-multipage-pam.patch       |   25 -
 netpbm-nodoc.patch               |   23 +-
 netpbm-security-code.patch       |  263 +++----
 netpbm-security-scripts.patch    |   97 +--
 netpbm-werror.patch              |  102 +++
 netpbm.spec                      |   31 +-
 sources                          |    2 +-
 13 files changed, 298 insertions(+), 2269 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1a934e7..34e7179 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /netpbm-10.61.02.tar.xz
+/netpbm-10.66.02.tar.xz
diff --git a/netpbm-disable-pbmtog3.patch b/netpbm-disable-pbmtog3.patch
new file mode 100644
index 0000000..7fb3ef6
--- /dev/null
+++ b/netpbm-disable-pbmtog3.patch
@@ -0,0 +1,13 @@
+diff --git a/test/Test-Order b/test/Test-Order
+index ff4b985..7ef1d97 100644
+--- a/test/Test-Order
++++ b/test/Test-Order
+@@ -74,7 +74,7 @@ symmetry.test
+ 
+ # Format converter tests
+ 
+-pbmtog3.test
++#pbmtog3.test
+ 411toppm.test
+ eyuvtoppm.test
+ 
diff --git a/netpbm-nodoc.patch b/netpbm-nodoc.patch
index 2ecf665..c35cd9e 100644
--- a/netpbm-nodoc.patch
+++ b/netpbm-nodoc.patch
@@ -1,20 +1,13 @@
---- netpbm-10.24/GNUmakefile.nodoc	2004-08-11 20:41:54.000000000 +0200
-+++ netpbm-10.24/GNUmakefile	2004-09-23 16:08:29.724369240 +0200
-@@ -275,16 +275,12 @@
+diff --git a/GNUmakefile b/GNUmakefile
+index b0b7f00..a46329d 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -369,7 +369,7 @@ install.lib:
  endif
  
- .PHONY: install.manweb
--install.manweb: $(PKGDIR)/man/web/netpbm.url $(PKGDIR)/bin/doc.url
-+install.manweb: $(PKGDIR)/man/web/netpbm.url
+ .PHONY: install.manwebmain
+-install.manwebmain: $(PKGDIR)/man/web/netpbm.url $(PKGDIR)/bin/doc.url
++install.manwebmain: $(PKGDIR)/man/web/netpbm.url
  
  $(PKGDIR)/man/web/netpbm.url: $(PKGDIR)/man/web
  	echo "$(NETPBM_DOCURL)" > $@
- 	chmod $(INSTALL_PERM_MAN) $@
- 
--$(PKGDIR)/bin/doc.url: $(PKGDIR)/bin
--	echo "$(NETPBM_DOCURL)" > $@
--	chmod $(INSTALL_PERM_MAN) $@
--
- .PHONY: install-dev
- # Note that you might install the development package and NOT the runtime
- # package.  If you have a special system for building stuff, maybe for 
diff --git a/netpbm-security-code.patch b/netpbm-security-code.patch
index 27b49fb..927773a 100644
--- a/netpbm-security-code.patch
+++ b/netpbm-security-code.patch
@@ -139,38 +139,6 @@ diff -up netpbm-10.58.01/converter/other/pnmtops.c.security-code netpbm-10.58.01
          cmdlineP->imageheight = imageheight * 72;
      }
      else
-diff -up netpbm-10.58.01/converter/other/pnmtorle.c.security-code netpbm-10.58.01/converter/other/pnmtorle.c
---- netpbm-10.58.01/converter/other/pnmtorle.c.security-code	2012-04-09 15:31:42.000000000 +0200
-+++ netpbm-10.58.01/converter/other/pnmtorle.c	2012-04-09 15:40:03.188619976 +0200
-@@ -19,6 +19,8 @@
-  * If you modify this software, you should include a notice giving the
-  * name of the person performing the modification, the date of modification,
-  * and the reason for such modification.
-+ *
-+ *  2002-12-19: Fix maths wrapping bugs. Alan Cox <alan at redhat.com>
-  */
- /*
-  * pnmtorle - A program which will convert pbmplus (ppm or pgm) images
-diff -up netpbm-10.58.01/converter/other/pnmtosgi.c.security-code netpbm-10.58.01/converter/other/pnmtosgi.c
---- netpbm-10.58.01/converter/other/pnmtosgi.c.security-code	2012-04-09 15:31:42.000000000 +0200
-+++ netpbm-10.58.01/converter/other/pnmtosgi.c	2012-04-09 15:40:03.188619976 +0200
-@@ -254,6 +254,7 @@ build_channels(FILE * const ifp, int con
- #endif
- 
-     if( storage != STORAGE_VERBATIM ) {
-+        overflow2(channels, rows);
-         MALLOCARRAY_NOFAIL(table, channels * rows);
-         MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
-     }
-@@ -306,6 +307,8 @@ compress(ScanElem * temp,
-             break;
-         case STORAGE_RLE:
-             tabrow = chan_no * rows + row;
-+            overflow2(chan_no, rows);
-+            overflow_add(chan_no* rows, row);
-             len = rle_compress(temp, cols);    /* writes result into rletemp */
-             channel[chan_no][row].length = len;
-             MALLOCARRAY(p, len);
 diff -up netpbm-10.58.01/converter/other/rletopnm.c.security-code netpbm-10.58.01/converter/other/rletopnm.c
 --- netpbm-10.58.01/converter/other/rletopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
 +++ netpbm-10.58.01/converter/other/rletopnm.c	2012-04-09 15:40:03.189619963 +0200
@@ -183,25 +151,6 @@ diff -up netpbm-10.58.01/converter/other/rletopnm.c.security-code netpbm-10.58.0
   */
  /*
   * rletopnm - A conversion program to convert from Utah's "rle" image format
-diff -up netpbm-10.58.01/converter/other/sgitopnm.c.security-code netpbm-10.58.01/converter/other/sgitopnm.c
---- netpbm-10.58.01/converter/other/sgitopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
-+++ netpbm-10.58.01/converter/other/sgitopnm.c	2012-04-09 15:40:03.189619963 +0200
-@@ -359,10 +359,14 @@ readChannels(FILE *       const ifP,
-         MALLOCARRAY_NOFAIL(image, head->ysize);
-     } else {
-         maxchannel = MIN(3, head->zsize);
-+        overflow2(head->ysize, maxchannel);
-         MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
-     }
--    if (table) 
-+    if (table) {
-+        overflow2(head->xsize, 2);
-+        overflow_add(head->xsize*2, 2);
-         MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
-+    }
- 
-     for (channel = 0; channel < maxchannel; ++channel) {
-         unsigned int row;
 diff -up netpbm-10.58.01/converter/other/sirtopnm.c.security-code netpbm-10.58.01/converter/other/sirtopnm.c
 --- netpbm-10.58.01/converter/other/sirtopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
 +++ netpbm-10.58.01/converter/other/sirtopnm.c	2012-04-09 15:40:03.190619951 +0200
@@ -729,46 +678,6 @@ diff -up netpbm-10.58.01/converter/ppm/ppmtoicr.c.security-code netpbm-10.58.01/
  		p = testimage;
  		for (i=0; i<rows; i++)
  			for (j=0; j<cols; j++) 
-diff -up netpbm-10.58.01/converter/ppm/ppmtoilbm.c.security-code netpbm-10.58.01/converter/ppm/ppmtoilbm.c
---- netpbm-10.58.01/converter/ppm/ppmtoilbm.c.security-code	2012-04-09 15:31:42.000000000 +0200
-+++ netpbm-10.58.01/converter/ppm/ppmtoilbm.c	2012-04-09 15:40:03.208619727 +0200
-@@ -1220,6 +1220,7 @@ ppm_to_rgb8(ifP, cols, rows, maxval)
- 
-     maskmethod = 0;     /* no masking - RGB8 uses genlock bits */
-     compmethod = 4;     /* RGB8 files are always compressed */
-+    overflow2(cols, 4);
-     MALLOCARRAY_NOFAIL(compr_row, cols * 4);
- 
-     if( maxval != 255 ) {
-@@ -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 */
-+    overflow2(cols, 2);
-     MALLOCARRAY_NOFAIL(compr_row, cols * 2);
- 
-     if( maxval != 15 ) {
-@@ -1785,6 +1787,7 @@ make_val_table(oldmaxval, newmaxval)
-     unsigned int i;
-     int * table;
- 
-+    overflow_add(oldmaxval, 1);
-     MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
-     for (i = 0; i <= oldmaxval; ++i)
-         table[i] = ROUNDDIV(i * newmaxval, oldmaxval);
-@@ -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;
--        if (DO_COMPRESS)
-+        if (DO_COMPRESS) {
-+            overflow2(cols,2);
-+            overflow_add(cols*2,2);
-             MALLOCARRAY_NOFAIL(compr_rowbuf, WORSTCOMPR(RowBytes(cols)));
-+	}
-     }
-     
-     switch (mode) {
 diff -up netpbm-10.58.01/converter/ppm/ppmtolj.c.security-code netpbm-10.58.01/converter/ppm/ppmtolj.c
 --- netpbm-10.58.01/converter/ppm/ppmtolj.c.security-code	2012-04-09 15:31:42.000000000 +0200
 +++ netpbm-10.58.01/converter/ppm/ppmtolj.c	2012-04-09 15:40:03.210619701 +0200
@@ -988,17 +897,6 @@ diff -up netpbm-10.58.01/converter/ppm/ximtoppm.c.security-code netpbm-10.58.01/
          header->colors = (Color *)calloc((unsigned int)header->ncolors,
                  sizeof(Color));
          if (header->colors == NULL) {
-diff -up netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code netpbm-10.58.01/converter/ppm/yuvtoppm.c
---- netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code	2012-04-09 15:31:44.000000000 +0200
-+++ netpbm-10.58.01/converter/ppm/yuvtoppm.c	2012-04-09 15:40:03.218619602 +0200
-@@ -72,6 +72,7 @@ main(argc, argv)
- 
- 	ppm_writeppminit(stdout, cols, rows, (pixval) 255, 0);
- 	pixrow = ppm_allocrow(cols);
-+    overflow_add(cols, 1);
-     MALLOCARRAY(yuvbuf, (cols+1)/2);
-     if (yuvbuf == NULL)
-         pm_error("Unable to allocate YUV buffer for %d columns.", cols);
 diff -up netpbm-10.58.01/editor/pamcut.c.security-code netpbm-10.58.01/editor/pamcut.c
 --- netpbm-10.58.01/editor/pamcut.c.security-code	2012-04-09 15:31:33.000000000 +0200
 +++ netpbm-10.58.01/editor/pamcut.c	2012-04-09 15:40:03.218619602 +0200
@@ -1119,29 +1017,6 @@ diff -up netpbm-10.58.01/editor/pnmscalefixed.c.security-code netpbm-10.58.01/ed
      sxscale = SCALE * newcols / cols;
      syscale = SCALE * newrows / rows;
  
-diff -up netpbm-10.58.01/editor/pnmshear.c.security-code netpbm-10.58.01/editor/pnmshear.c
---- netpbm-10.58.01/editor/pnmshear.c.security-code	2012-04-09 15:31:33.000000000 +0200
-+++ netpbm-10.58.01/editor/pnmshear.c	2012-04-09 15:40:03.224619526 +0200
-@@ -15,6 +15,7 @@
- #include <assert.h>
- #include <math.h>
- #include <string.h>
-+#include <limits.h>
- 
- #include "pm_c_util.h"
- #include "ppm.h"
-@@ -236,6 +237,11 @@ main(int argc, char * argv[]) {
- 
-     shearfac = fabs(tan(cmdline.angle));
- 
-+    if(rows * shearfac >= INT_MAX-1)
-+      pm_error("image too large");
-+    
-+    overflow_add(rows * shearfac, cols+1);
-+
-     newcols = rows * shearfac + cols + 0.999999;
- 
-     pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0);
 diff -up netpbm-10.58.01/editor/ppmdither.c.security-code netpbm-10.58.01/editor/ppmdither.c
 --- netpbm-10.58.01/editor/ppmdither.c.security-code	2012-04-09 15:31:33.000000000 +0200
 +++ netpbm-10.58.01/editor/ppmdither.c	2012-04-09 15:40:03.224619526 +0200
@@ -1215,18 +1090,6 @@ diff -up netpbm-10.58.01/generator/pgmcrater.c.security-code netpbm-10.58.01/gen
      if (aux == NULL) 
          pm_error("out of memory allocating elevation array");
  
-diff -up netpbm-10.58.01/generator/pgmkernel.c.security-code netpbm-10.58.01/generator/pgmkernel.c
---- netpbm-10.58.01/generator/pgmkernel.c.security-code	2012-04-09 15:31:34.000000000 +0200
-+++ netpbm-10.58.01/generator/pgmkernel.c	2012-04-09 15:40:03.226619502 +0200
-@@ -68,7 +68,7 @@ main ( argc, argv )
-     kycenter = (fysize - 1) / 2.0;
-     ixsize = fxsize + 0.999;
-     iysize = fysize + 0.999;
--    MALLOCARRAY(fkernel, ixsize * iysize);
-+    fkernel = (double *) malloc3 (ixsize, iysize, sizeof(double));
-     for (i = 0; i < iysize; i++) 
-         for (j = 0; j < ixsize; j++) {
-             fkernel[i*ixsize+j] = 1.0 / (1.0 + w * sqrt((double)
 diff -up netpbm-10.58.01/lib/libpam.c.security-code netpbm-10.58.01/lib/libpam.c
 --- netpbm-10.58.01/lib/libpam.c.security-code	2012-04-09 15:31:38.000000000 +0200
 +++ netpbm-10.58.01/lib/libpam.c	2012-04-09 15:40:03.227619490 +0200
@@ -1252,17 +1115,6 @@ diff -up netpbm-10.58.01/lib/libpammap.c.security-code netpbm-10.58.01/lib/libpa
      unsigned int const size = 
          sizeof(*retval) - sizeof(retval->tupleint.tuple) 
          + pamP->depth * sizeof(sample);
-diff -up netpbm-10.58.01/lib/libpbm1.c.security-code netpbm-10.58.01/lib/libpbm1.c
---- netpbm-10.58.01/lib/libpbm1.c.security-code	2012-04-09 15:31:38.000000000 +0200
-+++ netpbm-10.58.01/lib/libpbm1.c	2012-04-09 15:40:03.228619477 +0200
-@@ -77,6 +77,7 @@ pbm_check(FILE * file, const enum pm_che
-         pm_message("pm_filepos passed to pm_check() is %u bytes",
-                    sizeof(pm_filepos));
- #endif
-+        overflow2(bytes_per_row, rows);
-         pm_check(file, check_type, need_raster_size, retval_p);
-     }
- }
 diff -up netpbm-10.58.01/lib/libpm.c.security-code netpbm-10.58.01/lib/libpm.c
 --- netpbm-10.58.01/lib/libpm.c.security-code	2012-04-09 15:31:38.000000000 +0200
 +++ netpbm-10.58.01/lib/libpm.c	2012-04-09 15:40:03.229619464 +0200
@@ -1680,3 +1532,118 @@ diff -up netpbm-10.58.01/urt/scanargs.c.security-code netpbm-10.58.01/urt/scanar
  
  static CONST_DECL char * prformat( CONST_DECL char *, int );
  static int isnum( CONST_DECL char *, int, int );
+diff --git a/converter/other/pnmtorle.c b/converter/other/pnmtorle.c
+index 180b144..d99d99f 100644
+--- a/converter/other/pnmtorle.c
++++ b/converter/other/pnmtorle.c
+@@ -19,6 +19,8 @@
+  * If you modify this software, you should include a notice giving the
+  * name of the person performing the modification, the date of modification,
+  * and the reason for such modification.
++ *
++ *  2002-12-19: Fix maths wrapping bugs. Alan Cox <alan at redhat.com>
+  */
+ /*
+  * pnmtorle - A program which will convert pbmplus (ppm or pgm) images
+diff --git a/converter/ppm/ppmtoilbm.c b/converter/ppm/ppmtoilbm.c
+index e114457..7c46307 100644
+--- a/converter/ppm/ppmtoilbm.c
++++ b/converter/ppm/ppmtoilbm.c
+@@ -185,6 +185,7 @@ makeValTable(int const oldmaxval,
+     unsigned int i;
+     int * table;
+ 
++    overflow_add(oldmaxval, 1);
+     MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
+     for (i = 0; i <= oldmaxval; ++i)
+         table[i] = ROUNDDIV(i * newmaxval, oldmaxval);
+@@ -2328,8 +2329,11 @@ main(int argc, char ** argv) {
+         MALLOCARRAY_NOFAIL(coded_rowbuf, RowBytes(cols));
+         for (i = 0; i < RowBytes(cols); ++i)
+             coded_rowbuf[i] = 0;
+-        if (DO_COMPRESS)
++        if (DO_COMPRESS) {
++            overflow2(cols,2);
++            overflow_add(cols*2,2);
+             MALLOCARRAY_NOFAIL(compr_rowbuf, WORSTCOMPR(RowBytes(cols)));
++        }
+     }
+     
+     switch (mode) {
+diff --git a/editor/pnmshear.c b/editor/pnmshear.c
+index 99fa302..dedce11 100644
+--- a/editor/pnmshear.c
++++ b/editor/pnmshear.c
+@@ -15,6 +15,7 @@
+ #include <assert.h>
+ #include <math.h>
+ #include <string.h>
++#include <limits.h>
+ 
+ #include "pm_c_util.h"
+ #include "mallocvar.h"
+@@ -242,6 +243,11 @@ main(int argc, const char * argv[]) {
+ 
+     shearfac = fabs(tan(cmdline.angle));
+ 
++    if(rows * shearfac >= INT_MAX-1)
++      pm_error("image too large");
++    
++    overflow_add(rows * shearfac, cols+1);
++
+     newcols = rows * shearfac + cols + 0.999999;
+ 
+     pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0);
+diff --git a/lib/libpbm1.c b/lib/libpbm1.c
+index c96779e..543fa36 100644
+--- a/lib/libpbm1.c
++++ b/lib/libpbm1.c
+@@ -78,6 +78,7 @@ pbm_check(FILE *               const fileP,
+     } else {        
+         pm_filepos const bytesPerRow    = (cols+7)/8;
+         pm_filepos const needRasterSize = rows * bytesPerRow;
++        overflow2(bytesPerRow, rows);
+         pm_check(fileP, checkType, needRasterSize, retvalP);
+     }
+ }
+diff --git a/converter/other/pnmtosgi.c b/converter/other/pnmtosgi.c
+index a8df532..514e9e6 100644
+--- a/converter/other/pnmtosgi.c
++++ b/converter/other/pnmtosgi.c
+@@ -176,6 +176,8 @@ compress(ScanElem *   const tempArg,
+         break;
+     case STORAGE_RLE: {
+         unsigned int const tabrow = chanNum * rows + row;
++        overflow2(chanNum, rows);
++        overflow_add(chanNum* rows, row);
+         unsigned int const len = rleCompress(tempArg, cols);
+             /* writes result into rletemp */
+         unsigned int i;
+@@ -212,6 +214,7 @@ buildChannels(FILE *       const ifP,
+     ScanElem * temp;
+ 
+     if (storage != STORAGE_VERBATIM) {
++        overflow2(channels, rows);
+         MALLOCARRAY_NOFAIL(table, channels * rows);
+         MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
+     } else
+diff --git a/converter/other/sgitopnm.c b/converter/other/sgitopnm.c
+index 008d537..ea9a2e9 100644
+--- a/converter/other/sgitopnm.c
++++ b/converter/other/sgitopnm.c
+@@ -372,10 +372,14 @@ readChannels(FILE *       const ifP,
+         MALLOCARRAY_NOFAIL(image, head->ysize);
+     } else {
+         maxchannel = 3;
++        overflow2(head->ysize, maxchannel);
+         MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
+     }
+-    if (table)
++    if (table) {
++        overflow2(head->xsize, 2);
++        overflow2(head->xsize*2, 2);
+         MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
++    }
+ 
+     for (channel = 0; channel < maxchannel; ++channel) {
+         unsigned int row;
diff --git a/netpbm-security-scripts.patch b/netpbm-security-scripts.patch
index 831be82..6a9b197 100644
--- a/netpbm-security-scripts.patch
+++ b/netpbm-security-scripts.patch
@@ -1,7 +1,8 @@
-diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.05/converter/other/anytopnm
---- netpbm-10.47.05/converter/other/anytopnm.security-scripts	2009-12-10 08:34:36.000000000 +0100
-+++ netpbm-10.47.05/converter/other/anytopnm	2010-03-16 21:28:09.000000000 +0100
-@@ -510,10 +510,7 @@ else
+diff --git a/converter/other/anytopnm b/converter/other/anytopnm
+index acf8813..335312a 100755
+--- a/converter/other/anytopnm
++++ b/converter/other/anytopnm
+@@ -511,10 +511,7 @@ else
      inputFile="-"
  fi
  
@@ -13,10 +14,13 @@ diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.
  
  # Take out all spaces
  # Find the filename extension for last-ditch efforts later
-@@ -539,9 +536,17 @@ if [ "$filetype" = "unknown" ]; then
-     echo "$progname: unknown file type.  " \
-         "'file' says mime type is '$mimeType', " 1>&2
-     echo "type description is '$typeDescription'" 1>&2
+@@ -537,12 +534,17 @@ typeDescription=`file "$file" | cut -d: -f2- | cut -c2-`
+ determineType "$file" "$mimeType" "$typeDescription" "$fileExtension"
+ 
+ if [ "$filetype" = "unknown" ]; then
+-    echo "$progname: unknown file type.  " \
+-        "'file' says mime type is '$mimeType', " 1>&2
+-    echo "type description is '$typeDescription'" 1>&2
 +    if [ -d "$tempdir" ] ; then
 +        rm -rf "$tempdir"
 +    fi
@@ -31,10 +35,11 @@ diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.
 +fi
 +
  exit 0
-diff -up netpbm-10.47.05/editor/pamstretch-gen.security-scripts netpbm-10.47.05/editor/pamstretch-gen
---- netpbm-10.47.05/editor/pamstretch-gen.security-scripts	2009-12-10 08:34:32.000000000 +0100
-+++ netpbm-10.47.05/editor/pamstretch-gen	2010-03-16 21:28:47.000000000 +0100
-@@ -31,13 +31,9 @@ if [ "$1" = "" ]; then
+diff --git a/editor/pamstretch-gen b/editor/pamstretch-gen
+index ba0e818..250fca0 100755
+--- a/editor/pamstretch-gen
++++ b/editor/pamstretch-gen
+@@ -31,9 +31,7 @@ if [ "$1" = "" ]; then
    exit 1
  fi
  
@@ -44,15 +49,12 @@ diff -up netpbm-10.47.05/editor/pamstretch-gen.security-scripts netpbm-10.47.05/
 +tempfile=$(mktemp /tmp/pnmig.XXXXXXXXXX) || exit 1
  trap 'rm -rf $tempdir' 0 1 3 15
  
--tempfile=$tempdir/pnmig
--
- if ! cat $2 >$tempfile 2>/dev/null; then
-   echo 'pamstretch-gen: error reading file' 1>&2
-   exit 1
-diff -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/editor/pnmmargin
---- netpbm-10.47.05/editor/pnmmargin.security-scripts	2009-12-10 08:34:32.000000000 +0100
-+++ netpbm-10.47.05/editor/pnmmargin	2010-03-16 21:28:09.000000000 +0100
-@@ -11,15 +11,11 @@
+ tempfile=$tempdir/pnmig
+diff --git a/editor/pnmmargin b/editor/pnmmargin
+index 0f57d1d..e0d3625 100755
+--- a/editor/pnmmargin
++++ b/editor/pnmmargin
+@@ -11,11 +11,7 @@
  # documentation.  This software is provided "as is" without express or
  # implied warranty.
  
@@ -61,47 +63,37 @@ diff -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/edito
 -  { echo "Could not create temporary file. Exiting." 1>&2; exit 1;}
 -trap 'rm -rf $tempdir' 0 1 3 15
 -
--tmp1=$tempdir/pnmm1
--tmp2=$tempdir/pnmm2
--tmp3=$tempdir/pnmm3
--tmp4=$tempdir/pnmm4
-+tmpdir=$(mktemp -d -t ppmmargin.XXXXXXX) || exit 1
-+tmp1="$tmpdir/tmp1"
-+tmp2="$tmpdir/tmp2"
-+tmp3="$tmpdir/tmp3"
-+tmp4="$tmpdir/tmp4"
- 
- color="-gofigure"
- plainopt=""
++tempdir=$(mktemp -d -t ppmmargin.XXXXXXX) || exit 1
+ tmp1=$tempdir/pnmm1
+ tmp2=$tempdir/pnmm2
+ tmp3=$tempdir/pnmm3
 @@ -90,6 +86,7 @@ else
          -white | -black )
          pnmpad $plainopt $color \
              -left=$size -right=$size -top=$size -bottom=$size $tmp1
-+	rm -rf "$tmpdir"
++        rm -rf "$tempdir"
          exit
          ;;
          * )
-@@ -102,7 +99,4 @@ else
-     pnmcat -lr $tmp2 $tmp1 $tmp2 > $tmp4
+@@ -103,4 +100,4 @@ else
      pnmcat -tb $plainopt $tmp3 $tmp4 $tmp3
  fi
+ 
 -
--
--
--
-+rm -rf "$tmpdir"
-diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/ppmfade
---- netpbm-10.47.05/editor/ppmfade.security-scripts	2009-12-10 08:34:32.000000000 +0100
-+++ netpbm-10.47.05/editor/ppmfade	2010-03-16 21:28:09.000000000 +0100
-@@ -14,6 +14,7 @@
++rm -rf "$tempdir"
+diff --git a/editor/ppmfade b/editor/ppmfade
+index 027fc79..8eb094f 100755
+--- a/editor/ppmfade
++++ b/editor/ppmfade
+@@ -40,6 +40,7 @@ exec perl -w -x -S -- "$0" "$@"
  #
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ ##############################################################################
  use strict;
 +use File::Temp "tempdir";
  
  my $SPREAD =  1;
  my $SHIFT =   2;
-@@ -111,20 +112,26 @@ if ($first_file ne "undefined") {
+@@ -137,20 +138,26 @@ if ($first_file ne "undefined") {
  
  print("Frames are " . $width . "W x " . $height . "H\n");
  
@@ -132,7 +124,7 @@ diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/
  }
  
  #
-@@ -132,14 +139,14 @@ if ($last_file eq "undefined") {
+@@ -158,14 +165,14 @@ if ($last_file eq "undefined") {
  #
  
  # Here's what our temporary files are:
@@ -155,7 +147,7 @@ diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/
  
  my $i;    # Frame number
  for ($i = 1; $i <= $nframes; $i++) {
-@@ -147,147 +154,147 @@ for ($i = 1; $i <= $nframes; $i++) {
+@@ -173,147 +180,147 @@ for ($i = 1; $i <= $nframes; $i++) {
      if ($mode eq $SPREAD) {
          if ($i <= 10) {
              my $n = $spline20[$i] * 100;
@@ -356,10 +348,11 @@ diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/
 +system("rm $tmpdir/junk*$$.ppm");
  
  exit(0);
-diff -up netpbm-10.47.05/editor/ppmshadow.security-scripts netpbm-10.47.05/editor/ppmshadow
---- netpbm-10.47.05/editor/ppmshadow.security-scripts	2009-12-10 08:34:32.000000000 +0100
-+++ netpbm-10.47.05/editor/ppmshadow	2010-03-16 21:28:09.000000000 +0100
-@@ -72,9 +72,10 @@ sub makeConvolutionKernel($$) {
+diff --git a/editor/ppmshadow b/editor/ppmshadow
+index 62cdf8b..72e1b22 100755
+--- a/editor/ppmshadow
++++ b/editor/ppmshadow
+@@ -97,9 +97,10 @@ sub makeConvolutionKernel($$) {
  
  
  my $tmpdir = $ENV{TMPDIR} || "/tmp";
diff --git a/netpbm-werror.patch b/netpbm-werror.patch
new file mode 100644
index 0000000..692bbe4
--- /dev/null
+++ b/netpbm-werror.patch
@@ -0,0 +1,102 @@
+diff --git a/converter/pbm/cmuwmtopbm.c b/converter/pbm/cmuwmtopbm.c
+index 5c138c1..1f9bc6c 100644
+--- a/converter/pbm/cmuwmtopbm.c
++++ b/converter/pbm/cmuwmtopbm.c
+@@ -48,20 +48,20 @@ readCmuwmHeader(FILE *         const ifP,
+ 
+     rc = pm_readbiglong(ifP, &l);
+     if (rc == -1 )
+-        pm_error(initReadError);
++        pm_error("%s", initReadError);
+     if ((uint32_t)l != cmuwmMagic)
+         pm_error("bad magic number in CMU window manager file");
+     rc = pm_readbiglong(ifP, &l);
+     if (rc == -1)
+-        pm_error(initReadError);
++        pm_error("%s", initReadError);
+     *colsP = l;
+     rc = pm_readbiglong(ifP, &l);
+     if (rc == -1 )
+-        pm_error(initReadError);
++        pm_error("%s", initReadError);
+     *rowsP = l;
+     rc = pm_readbigshort(ifP, &s);
+     if (rc == -1)
+-        pm_error(initReadError);
++        pm_error("%s", initReadError);
+     *depthP = s;
+ }
+ 
+diff --git a/converter/other/tifftopnm.c b/converter/other/tifftopnm.c
+index 3aa2e43..b8ebf39 100644
+--- a/converter/other/tifftopnm.c
++++ b/converter/other/tifftopnm.c
+@@ -1459,7 +1459,7 @@ convertRasterInMemory(pnmOut *       const pnmOutP,
+         int ok;
+         ok = TIFFRGBAImageOK(tif, emsg);
+         if (!ok) {
+-            pm_message(emsg);
++            pm_message("%s", emsg);
+             *statusP = CONV_UNABLE;
+         } else {
+             uint32 * raster;
+@@ -1479,14 +1479,14 @@ convertRasterInMemory(pnmOut *       const pnmOutP,
+                 
+                 ok = TIFFRGBAImageBegin(&img, tif, stopOnErrorFalse, emsg);
+                 if (!ok) {
+-                    pm_message(emsg);
++                    pm_message("%s", emsg);
+                     *statusP = CONV_FAILED;
+                 } else {
+                     int ok;
+                     ok = TIFFRGBAImageGet(&img, raster, cols, rows);
+                     TIFFRGBAImageEnd(&img) ;
+                     if (!ok) {
+-                        pm_message(emsg);
++                        pm_message("%s", emsg);
+                         *statusP = CONV_FAILED;
+                     } else {
+                         *statusP = CONV_DONE;
+diff --git a/lib/util/pm_c_util.h b/lib/util/pm_c_util.h
+index 01a0765..8f5aa01 100644
+--- a/lib/util/pm_c_util.h
++++ b/lib/util/pm_c_util.h
+@@ -80,10 +80,10 @@
+ #endif
+ 
+ #ifndef TRUE
+-  #define TRUE true
++  #define TRUE 1
+   #endif
+ #ifndef FALSE
+-  #define FALSE false
++  #define FALSE 0
+   #endif
+ 
+ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+diff --git a/converter/other/fiasco/pnmtofiasco.c b/converter/other/fiasco/pnmtofiasco.c
+index d78ff6b..761dac5 100644
+--- a/converter/other/fiasco/pnmtofiasco.c
++++ b/converter/other/fiasco/pnmtofiasco.c
+@@ -170,7 +170,7 @@ main (int argc, char **argv)
+       return 0;
+    else
+    {
+-      fprintf (stderr, fiasco_get_error_message ());
++      fprintf (stderr, "%s", fiasco_get_error_message ());
+       fprintf (stderr, "\n");
+       return 1;
+    }
+diff --git a/converter/other/fiasco/params.c b/converter/other/fiasco/params.c
+index a4d843a..9659e9f 100644
+--- a/converter/other/fiasco/params.c
++++ b/converter/other/fiasco/params.c
+@@ -656,7 +656,7 @@ usage (const param_t *params, const char *progname, const char *synopsis,
+     fprintf (stderr, "Usage: %s [OPTION]...%s\n", progname,
+              non_opt_string ? non_opt_string : " ");
+     if (synopsis != NULL)
+-        fprintf (stderr, synopsis);
++        fprintf (stderr, "%s\n", synopsis);
+     fprintf (stderr, "\n\n");
+     fprintf (stderr, "Mandatory or optional arguments to long options "
+              "are mandatory or optional\nfor short options too. "
diff --git a/netpbm.spec b/netpbm.spec
index fd00155..29bec7d 100644
--- a/netpbm.spec
+++ b/netpbm.spec
@@ -1,7 +1,7 @@
 Summary: A library for handling different graphics file formats
 Name: netpbm
-Version: 10.61.02
-Release: 9%{?dist}
+Version: 10.66.02
+Release: 1%{?dist}
 # See copyright_summary for details
 License: BSD and GPLv2 and IJG and MIT and Public Domain
 Group: System Environment/Libraries
@@ -33,13 +33,8 @@ Patch22: netpbm-pamtojpeg2k.patch
 Patch23: netpbm-manfix.patch
 Patch24: netpbm-ppmtopict.patch
 Patch25: netpbm-pnmtopclxl.patch
-#Patch26: netpbm-man-repeated.patch
-Patch27: netpbm-multipage-pam.patch
-Patch28: netpbm-compare-same-images.patch
-#Patch29: netpbm-man-corrections.patch
-Patch29: netpbm-manual-pages.patch
-Patch30: netpbm-format-security.patch
-Patch31: netpbm-more-files.patch
+Patch26: netpbm-werror.patch
+Patch27: netpbm-disable-pbmtog3.patch
 BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
 BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel
 
@@ -104,7 +99,7 @@ netpbm-doc.  You'll also need to install the netpbm-progs package.
 %patch9 -p1 -b .xwdfix
 %patch11 -p1 -b .multilib
 %patch13 -p1 -b .glibc
-%patch15 -p1
+%patch15 -p1 -b .docfix
 %patch16 -p1 -b .ppmfadeusage
 %patch17 -p1 -b .fiasco-overflow
 %patch20 -p1 -b .noppmtompeg
@@ -113,13 +108,8 @@ netpbm-doc.  You'll also need to install the netpbm-progs package.
 %patch23 -p1 -b .manfix
 %patch24 -p1 -b .ppmtopict
 %patch25 -p1 -b .pnmtopclxl
-#%patch26 -p1 -b .man-repeated
-%patch27 -p1 -b .multipage-pam
-%patch28 -p1 -b .compare-same-images
-#%patch29 -p1 -b .man-corrections
-%patch29 -p1 -b .manual-pages
-%patch30 -p1 -b .fmt-sec
-%patch31 -p1 -b .more-files
+%patch26 -p1 -b .werror
+%patch27 -p1 -b .disable-pbmtog3
 
 sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in
 rm -rf converter/other/jpeg2000/libjasper/
@@ -224,6 +214,7 @@ rm -rf $RPM_BUILD_ROOT/usr/misc
 rm -rf $RPM_BUILD_ROOT/usr/man
 rm -rf $RPM_BUILD_ROOT/usr/pkginfo
 rm -rf $RPM_BUILD_ROOT/usr/config_template
+rm -rf $RPM_BUILD_ROOT/usr/pkgconfig_template
 
 # Don't ship the static library
 rm -f $RPM_BUILD_ROOT/%{_libdir}/lib*.a
@@ -240,6 +231,7 @@ popd
 pushd test
 export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
 export PBM_TESTPREFIX=$RPM_BUILD_ROOT%{_bindir}
+export PBM_BINPREFIX=$RPM_BUILD_ROOT%{_bindir}
 ./Execute-Tests && exit 0
 popd
 
@@ -274,7 +266,10 @@ rm -rf $RPM_BUILD_ROOT
 %doc userguide/*
 
 %changelog
-* Wed Nov 13 2013 Petr Hracek <phracek at redhat.com> - 10.61.02-9
+* Tue May 13 2014 Petr Hracek <phracek at redhat.com> - 10.66.02-1
+- Update new sources (#1063264)
+
+* Wed Nov 13 2013 Petr Hracek <phracek at redhat.com> - 10.61.02-8
 - pnmtops hangs in case of more then 10 files (#1029512)
 
 * Mon Apr 14 2014 Jaromir Capik <jcapik at redhat.com> - 10.61.02-8
diff --git a/sources b/sources
index 1a5f01c..1f41b8d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-42bbb9fb283687c82e5c608901b22061  netpbm-10.61.02.tar.xz
+dcb7de91384d630eb399e48c71158f3d  netpbm-10.66.02.tar.xz


More information about the scm-commits mailing list