diff options
Diffstat (limited to 'libre/netpbm/netpbm-security-scripts.patch')
-rw-r--r-- | libre/netpbm/netpbm-security-scripts.patch | 102 |
1 files changed, 49 insertions, 53 deletions
diff --git a/libre/netpbm/netpbm-security-scripts.patch b/libre/netpbm/netpbm-security-scripts.patch index db056db99..0dfe84f43 100644 --- a/libre/netpbm/netpbm-security-scripts.patch +++ b/libre/netpbm/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,38 +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 ;; * ) -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 @@ +@@ -103,4 +100,4 @@ else + pnmcat -tb $plainopt $tmp3 $tmp4 $tmp3 + fi + +- ++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"); @@ -123,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: @@ -146,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; @@ -347,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"; @@ -364,10 +366,4 @@ diff -up netpbm-10.47.05/editor/ppmshadow.security-scripts netpbm-10.47.05/edito # 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" + |