netpbm: update to 10.75.00.

This commit is contained in:
Christian Neukirchen 2016-06-27 11:58:55 +02:00
parent 6eee9a76a0
commit 3c9fa1c3de
3 changed files with 3 additions and 129 deletions

View file

@ -851,17 +851,6 @@ diff -up netpbm-10.58.01/editor/pamcut.c.security-code netpbm-10.58.01/editor/pa
outpam.width = rightcol - leftcol + 1;
outpam.height = bottomrow - toprow + 1;
diff -up netpbm-10.58.01/editor/pbmreduce.c.security-code netpbm-10.58.01/editor/pbmreduce.c
--- netpbm-10.58.01/editor/pbmreduce.c.security-code 2012-04-09 15:31:33.000000000 +0200
+++ netpbm-10.58.01/editor/pbmreduce.c 2012-04-09 15:40:03.219619590 +0200
@@ -94,6 +94,7 @@ main( argc, argv )
if (halftone == QT_FS) {
unsigned int col;
/* Initialize Floyd-Steinberg. */
+ overflow_add(newcols, 2);
MALLOCARRAY(thiserr, newcols + 2);
MALLOCARRAY(nexterr, newcols + 2);
if (thiserr == NULL || nexterr == NULL)
diff -up netpbm-10.58.01/editor/pnmgamma.c.security-code netpbm-10.58.01/editor/pnmgamma.c
--- netpbm-10.58.01/editor/pnmgamma.c.security-code 2012-04-09 15:31:34.000000000 +0200
+++ netpbm-10.58.01/editor/pnmgamma.c 2012-04-09 15:40:03.220619577 +0200
@ -1020,14 +1009,6 @@ diff -up netpbm-10.58.01/generator/pbmtext.c.security-code netpbm-10.58.01/gener
maxlines *= 2;
REALLOCARRAY(text_array, maxlines);
if (text_array == NULL)
@@ -832,6 +835,7 @@ main(int argc, const char *argv[]) {
hmargin = fontP->maxwidth;
} else {
vmargin = fontP->maxheight;
+ overflow2(2, fontP->maxwidth);
hmargin = 2 * fontP->maxwidth;
}
}
diff -up netpbm-10.58.01/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

View file

@ -1,86 +1,3 @@
diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.05/converter/other/anytopnm
--- netpbm-10.47.05/converter/other/anytopnm.security-scripts 2009-12-10 08:34:36.000000000 +0100
+++ netpbm-10.47.05/converter/other/anytopnm 2010-03-16 21:28:09.000000000 +0100
@@ -510,10 +510,7 @@ else
inputFile="-"
fi
-tempdir="${TMPDIR-/tmp}/anytopnm.$$"
-mkdir -m 0700 $tempdir || \
- { echo "Could not create temporary file. Exiting."; exit 1;}
-trap 'rm -rf $tempdir' 0
+tempdir=$(mktemp -d -t anytopnm.XXXXXXXXXX) || exit 1
# Take out all spaces
# Find the filename extension for last-ditch efforts later
@@ -539,9 +536,17 @@ if [ "$filetype" = "unknown" ]; then
echo "$progname: unknown file type. " \
"'file' says mime type is '$mimeType', " 1>&2
echo "type description is '$typeDescription'" 1>&2
+ if [ -d "$tempdir" ] ; then
+ rm -rf "$tempdir"
+ fi
+
exit 1
fi
convertIt $file $filetype
+if [ -d "$tempdir" ] ; then
+ rm -rf "$tempdir"
+fi
+
exit 0
diff -up netpbm-10.47.05/editor/pamstretch-gen.security-scripts netpbm-10.47.05/editor/pamstretch-gen
--- netpbm-10.47.05/editor/pamstretch-gen.security-scripts 2009-12-10 08:34:32.000000000 +0100
+++ netpbm-10.47.05/editor/pamstretch-gen 2010-03-16 21:28:47.000000000 +0100
@@ -31,13 +31,9 @@ if [ "$1" = "" ]; then
exit 1
fi
-tempdir="${TMPDIR-/tmp}/pamstretch-gen.$$"
-mkdir -m 0700 $tempdir || \
- { echo "Could not create temporary file. Exiting."; exit 1;}
+tempfile=$(mktemp /tmp/pnmig.XXXXXXXXXX) || exit 1
trap 'rm -rf $tempdir' 0 1 3 15
-tempfile=$tempdir/pnmig
-
if ! cat $2 >$tempfile 2>/dev/null; then
echo 'pamstretch-gen: error reading file' 1>&2
exit 1
diff -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/editor/pnmmargin
--- netpbm-10.47.05/editor/pnmmargin.security-scripts 2009-12-10 08:34:32.000000000 +0100
+++ netpbm-10.47.05/editor/pnmmargin 2010-03-16 21:28:09.000000000 +0100
@@ -11,15 +11,11 @@
# documentation. This software is provided "as is" without express or
# implied warranty.
-tempdir="${TMPDIR-/tmp}/pnmmargin.$$"
-mkdir -m 0700 $tempdir || \
- { echo "Could not create temporary file. Exiting." 1>&2; exit 1;}
-trap 'rm -rf $tempdir' 0 1 3 15
-
-tmp1=$tempdir/pnmm1
-tmp2=$tempdir/pnmm2
-tmp3=$tempdir/pnmm3
-tmp4=$tempdir/pnmm4
+tmpdir=$(mktemp -d -t ppmmargin.XXXXXXX) || exit 1
+tmp1="$tmpdir/tmp1"
+tmp2="$tmpdir/tmp2"
+tmp3="$tmpdir/tmp3"
+tmp4="$tmpdir/tmp4"
color="-gofigure"
plainopt=""
@@ -90,6 +86,7 @@ else
-white | -black )
pnmpad $plainopt $color \
-left=$size -right=$size -top=$size -bottom=$size $tmp1
+ rm -rf "$tmpdir"
exit
;;
* )
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
@ -347,27 +264,3 @@ 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($$) {
my $tmpdir = $ENV{TMPDIR} || "/tmp";
-my $ourtmp = "$tmpdir/ppmshadow$$";
-mkdir($ourtmp, 0777) or
- die("Unable to create directory for temporary files '$ourtmp");
+my $ourtmp; chomp($ourtmp = `mktemp -d -t PPMshadow.XXXXXX`);
+if ($? >> 8) {
+ die "Can't create directory for temporary files";
+}
# Process command line options
--- snetpbm-10.47.05/editor/pnmmargin.orig 2014-06-16 21:30:27.480812666 -0400
+++ netpbm-10.47.05/editor/pnmmargin 2014-06-16 21:30:41.500789921 -0400
@@ -101,3 +101,4 @@
fi
+rm -rf "$tmpdir"

View file

@ -1,9 +1,9 @@
# Template file for 'netpbm'
pkgname=netpbm
# from http://svn.code.sf.net/p/netpbm/code/advanced/doc/HISTORY
version=10.74.05
version=10.75.00
revision=1
_githash=fe14f983ade44baa0794e4ce58a1a5334e46cf68
_githash=aab4792db8e0adcaf63cf57a1f5e0b18666dae47
_githash_guide=e09be88033bbbe215bfa825de4637c6478704de8
create_wrksrc=yes
build_wrksrc="netpbm-mirror-${_githash}"
@ -16,7 +16,7 @@ homepage="http://netpbm.sourceforge.net/"
nocross=yes
distfiles="https://github.com/chneukirchen/netpbm-mirror/archive/${_githash}.tar.gz
https://github.com/chneukirchen/netpbm-mirror/archive/${_githash_guide}.tar.gz"
checksum="779bb71a18ec8b2856d9eb96a049611003d5648e188187bad6c58f82cb0023e1
checksum="e74a6701cb6e6f93b86d836884ecb39a1fac9b799abfbeaf25402d9f54bc837a
dd724c0153a931d8fa99f60c0f48be17fba9663f10e11437bf109137f6eee8da"
post_extract() {