diff --git a/netpbm-security-code.patch b/netpbm-security-code.patch index 84deed0..90ee6f7 100644 --- a/netpbm-security-code.patch +++ b/netpbm-security-code.patch @@ -2830,42 +2830,6 @@ diff -ruNp a/other/pnmcolormap.c b/other/pnmcolormap.c } { unsigned int const intQuotient = colormap.size / pamP->width; -diff -ruNp a/urt/rle_addhist.c b/urt/rle_addhist.c ---- a/urt/rle_addhist.c 2021-06-02 15:53:59.825205563 +0200 -+++ b/urt/rle_addhist.c 2021-06-02 20:23:21.834634475 +0200 -@@ -70,13 +70,18 @@ rle_addhist(char * argv[], - return; - - length = 0; -- for (i = 0; argv[i]; ++i) -+ for (i = 0; argv[i]; ++i) { -+ overflow_add(length, strlen(argv[i])); -+ overflow_add(length+1, strlen(argv[i])); - length += strlen(argv[i]) +1; /* length of each arg plus space. */ -+ } - - time(&temp); - timedate = ctime(&temp); - length += strlen(timedate); /* length of date and time in ASCII. */ -- -+ overflow_add(strlen(padding), 4); -+ overflow_add(strlen(histoire), strlen(padding) + 4); -+ overflow_add(length, strlen(histoire) + strlen(padding) + 4); - length += strlen(padding) + 3 + strlen(histoire) + 1; - /* length of padding, "on " and length of history name plus "="*/ - if (in_hdr) /* if we are interested in the old comments... */ -@@ -84,8 +89,10 @@ rle_addhist(char * argv[], - else - old = NULL; - -- if (old && *old) -+ if (old && *old) { -+ overflow_add(length, strlen(old)); - length += strlen(old); /* add length if there. */ -+ } - - ++length; /*Cater for the null. */ - diff -ruNp a/urt/rle_getrow.c b/urt/rle_getrow.c --- a/urt/rle_getrow.c 2021-06-02 15:53:59.825205563 +0200 +++ b/urt/rle_getrow.c 2021-06-02 20:23:21.834634475 +0200 @@ -2946,72 +2910,59 @@ diff -ruNp a/urt/rle_putcom.c b/urt/rle_putcom.c /* Not found */ /* Can't realloc because somebody else might be pointing to this * comments block. Of course, if this were true, then the -diff -ruNp a/urt/Runput.c b/urt/Runput.c ---- a/urt/Runput.c 2021-06-02 15:53:59.825205563 +0200 -+++ b/urt/Runput.c 2021-06-02 20:23:21.834634475 +0200 -@@ -202,10 +202,11 @@ RunSetup(rle_hdr * the_hdr) +diff -urNp a/urt/rle_addhist.c b/urt/rle_addhist.c +--- a/urt/rle_addhist.c 2022-06-28 08:11:09.204119859 +0200 ++++ b/urt/rle_addhist.c 2022-06-29 09:20:31.573600515 +0200 +@@ -70,13 +70,19 @@ rle_addhist(char * argv[], + return; + + length = 0; +- for (i = 0; argv[i]; ++i) ++ for (i = 0; argv[i]; ++i) { ++ overflow_add(length, strlen(argv[i])); ++ overflow_add(length+1, strlen(argv[i])); + length += strlen(argv[i]) +1; /* length of each arg plus space. */ ++ } + + time(&temp); + timedate = ctime(&temp); + length += strlen(timedate); /* length of date and time in ASCII. */ + ++ overflow_add(strlen(padding), 4); ++ overflow_add(strlen(histoire), strlen(padding) + 4); ++ overflow_add(length, strlen(histoire) + strlen(padding) + 4); + length += strlen(padding) + 3 + strlen(histoire) + 1; + /* length of padding, "on " and length of history name plus "="*/ + if (in_hdr) /* if we are interested in the old comments... */ +@@ -84,8 +90,10 @@ rle_addhist(char * argv[], + else + old = NULL; + +- if (old && *old) ++ if (old && *old) { ++ overflow_add(length, strlen(old)); + length += strlen(old); /* add length if there. */ ++ } + + ++length; /*Cater for the null. */ + +diff -urNp a/urt/Runput.c b/urt/Runput.c +--- a/urt/Runput.c 2022-06-28 08:11:09.204119859 +0200 ++++ b/urt/Runput.c 2022-06-29 09:28:03.951620062 +0200 +@@ -202,6 +202,7 @@ RunSetup(rle_hdr * the_hdr) if ( the_hdr->background != 0 ) { - register int i; -- register rle_pixel *background = -- (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); -- register int *bg_color; -- /* -+ register rle_pixel *background; -+ register int *bg_color; -+ -+ overflow_add(the_hdr->ncolors,1); -+ background = (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); /* - * If even number of bg color bytes, put out one more to get to - * 16 bit boundary. - */ + int i; ++ overflow_add(the_hdr->ncolors, 1); + rle_pixel *background = + (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) ); + int *bg_color; @@ -224,7 +225,7 @@ RunSetup(rle_hdr * the_hdr) - /* Big-endian machines are harder */ - register int i, nmap = (1 << the_hdr->cmaplen) * - the_hdr->ncmap; -- register char *h_cmap = (char *)malloc( nmap * 2 ); -+ register char *h_cmap = (char *)malloc2( nmap, 2 ); - if ( h_cmap == NULL ) - { - fprintf( stderr, -diff -ruNp a/urt/scanargs.c b/urt/scanargs.c ---- a/urt/scanargs.c 2021-06-02 15:53:59.825205563 +0200 -+++ b/urt/scanargs.c 2021-06-02 20:56:36.681068294 +0200 -@@ -62,8 +62,8 @@ typedef int *ptr; - /* - * Storage allocation macros - */ --#define NEW( type, cnt ) (type *) malloc( (cnt) * sizeof( type ) ) --#define RENEW( type, ptr, cnt ) (type *) realloc( ptr, (cnt) * sizeof( type ) ) -+#define NEW( type, cnt ) (type *) malloc2( (cnt), sizeof( type ) ) -+#define RENEW( type, ptr, cnt ) (type *) realloc2( ptr, (cnt), sizeof( type ) ) - - static CONST_DECL char * prformat( CONST_DECL char *, int ); - static int isnum( CONST_DECL char *, int, int ); -@@ -114,7 +114,7 @@ va_list argl; - - bool required; - int excnt; /* which flag is set */ -- unsigned int exflag; /* How many of a set of exclusive -+ bool exflag; /* when set, one of a set of exclusive - flags is set */ - - bool list_of; /* set if parsing off a list of args */ -@@ -258,7 +258,7 @@ reswitch: - /* go back to label */ - ncp = cp-1; /* remember */ - cp -= 3; -- for (excnt = exflag = 0 -+ for (excnt = 0, exflag = NO - ; *cp != ' ' && !(*cp=='-' &&(cp[-1]=='!'||cp[-1]=='%')); - (--cp, excnt++)) - { -@@ -273,7 +273,7 @@ reswitch: - ERROR ("extra flags ignored"); - if (exflag) - ERROR ("more than one exclusive flag chosen"); -- exflag++; -+ exflag = YES; - required = NO; - check += cnt; - arg_used[cnt] = 1; + /* Big-endian machines are harder */ + int i, nmap = (1 << the_hdr->cmaplen) * + the_hdr->ncmap; +- char *h_cmap = (char *)malloc( nmap * 2 ); ++ char *h_cmap = (char *)malloc2( nmap, 2 ); + if ( h_cmap == NULL ) + { + fprintf( stderr, diff --git a/netpbm-security-scripts.patch b/netpbm-security-scripts.patch index 0ba822a..2730e5b 100644 --- a/netpbm-security-scripts.patch +++ b/netpbm-security-scripts.patch @@ -1,267 +1,119 @@ -diff --git a/editor/ppmfade b/editor/ppmfade -index dcd7bf2..5091651 100755 ---- a/editor/ppmfade -+++ b/editor/ppmfade -@@ -40,6 +40,7 @@ exec perl -w -x -S -- "$0" "$@" - # - ############################################################################## - use strict; -+use File::Temp "tempdir"; - - sub doVersionHack($) { - my ($argvR) = @_; -@@ -149,20 +150,26 @@ if ($first_file ne "undefined") { - - print("Frames are " . $width . "W x " . $height . "H\n"); - -+# -+# We create a tmp-directory right here -+# -+my $tmpdir = tempdir("ppmfade.XXXXXX", CLEANUP => 1); -+ -+ - if ($first_file eq "undefined") { - print "Fading from black to "; -- system("ppmmake \\#000 $width $height >junk1$$.ppm"); -+ system("ppmmake \\#000 $width $height >$tmpdir/junk1$$.ppm"); - } else { - print "Fading from $first_file to "; -- system("cp", $first_file, "junk1$$.ppm"); -+ system("cp", $first_file, "$tmpdir/junk1$$.ppm"); - } - - if ($last_file eq "undefined") { - print "black.\n"; -- system("ppmmake \\#000 $width $height >junk2$$.ppm"); -+ system("ppmmake \\#000 $width $height >$tmpdir/junk2$$.ppm"); - } else { - print "$last_file\n"; -- system("cp", $last_file, "junk2$$.ppm"); -+ system("cp", $last_file, "$tmpdir/junk2$$.ppm"); - } - - # -@@ -170,14 +177,14 @@ if ($last_file eq "undefined") { - # - - # Here's what our temporary files are: --# junk1$$.ppm: The original (fade-from) image --# junk2$$.ppm: The target (fade-from) image --# junk3$$.ppm: The frame of the fade for the current iteration of the --# the for loop. --# junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate --# image to another, this is the first frame of that --# sequence. --# junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence -+# $tmpdir/junk1$$.ppm: The original (fade-from) image -+# $tmpdir/junk2$$.ppm: The target (fade-from) image -+# $tmpdir/junk3$$.ppm: The frame of the fade for the current iteration of the -+# the for loop. -+# $tmpdir/junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate -+# image to another, this is the first frame of that -+# sequence. -+# $tmpdir/junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence - - my $i; # Frame number - for ($i = 1; $i <= $nframes; $i++) { -@@ -185,147 +192,147 @@ for ($i = 1; $i <= $nframes; $i++) { - if ($mode eq $SPREAD) { - if ($i <= 10) { - my $n = $spline20[$i] * 100; -- system("ppmspread $n junk1$$.ppm >junk3$$.ppm"); -+ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n; +diff -urNp a/editor/ppmfade b/editor/ppmfade +--- a/editor/ppmfade 2022-06-28 07:58:59.195317750 +0200 ++++ b/editor/ppmfade 2022-06-28 08:04:56.070643056 +0200 +@@ -215,84 +215,84 @@ for ($i = 1; $i <= $nframes; $i++) { $n = $spline20[$i] * 100; -- system("ppmspread $n junk1$$.ppm >junk1a$$.ppm"); -+ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm"); - $n = (1-$spline20[$i-10]) * 100; -- system("ppmspread $n junk2$$.ppm >junk2a$$.ppm"); -+ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm"); - $n = $spline10[$i-10]; -- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = (1-$spline20[$i-10])*100; -- system("ppmspread $n junk2$$.ppm >junk3$$.ppm"); -+ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - } elsif ($mode eq $SHIFT) { - if ($i <= 10) { - my $n = $spline20[$i] * 100; -- system("ppmshift $n junk1$$.ppm >junk3$$.ppm"); -+ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n; - $n = $spline20[$i] * 100; -- system("ppmshift $n junk1$$.ppm >junk1a$$.ppm"); -+ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm"); + system("ppmshift $n $tmpdir/junk1.ppm >$tmpdir/junk1a.ppm"); $n = (1-$spline20[$i-10])*100; -- system("ppmshift $n junk2$$.ppm >junk2a$$.ppm"); -+ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm"); +- system("ppmshift $n junk2.ppm >junk2a.ppm"); ++ system("ppmshift $n $tmpdir/junk2.ppm >$tmpdir/junk2a.ppm"); $n = $spline10[$i-10]; -- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1a.ppm junk2a.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1a.ppm $tmpdir/junk2a.ppm >$tmpdir/junk3.ppm"); } else { my $n = (1-$spline20[$i-10]) * 100; -- system("ppmshift $n junk2$$.ppm >junk3$$.ppm"); -+ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmshift $n junk2.ppm >junk3.ppm"); ++ system("ppmshift $n $tmpdir/junk2.ppm >$tmpdir/junk3.ppm"); } } elsif ($mode eq $RELIEF) { if ($i == 1) { -- system("ppmrelief junk1$$.ppm >junk1r$$.ppm"); -+ system("ppmrelief $tmpdir/junk1$$.ppm >$tmpdir/junk1r$$.ppm"); +- system("ppmrelief junk1.ppm >junk1r.ppm"); ++ system("ppmrelief $tmpdir/junk1.ppm >$tmpdir/junk1r.ppm"); } if ($i <= 10) { my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1r$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1r$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1.ppm junk1r.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1.ppm $tmpdir/junk1r.ppm >$tmpdir/junk3.ppm"); } elsif ($i <= 20) { my $n = $spline10[$i-10]; -- system("ppmmix $n junk1r$$.ppm junk2r$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1r$$.ppm $tmpdir/junk2r$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1r.ppm junk2r.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1r.ppm $tmpdir/junk2r.ppm >$tmpdir/junk3.ppm"); } else { my $n = $spline10[$i-20]; -- system("ppmmix $n junk2r$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2r$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk2r.ppm junk2.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk2r.ppm $tmpdir/junk2.ppm >$tmpdir/junk3.ppm"); } if ($i == 10) { -- system("ppmrelief junk2$$.ppm >junk2r$$.ppm"); -+ system("ppmrelief $tmpdir/junk2$$.ppm >$tmpdir/junk2r$$.ppm"); +- system("ppmrelief junk2.ppm >junk2r.ppm"); ++ system("ppmrelief $tmpdir/junk2.ppm >$tmpdir/junk2r.ppm"); } } elsif ($mode eq $OIL) { if ($i == 1) { -- system("ppmtopgm junk1$$.ppm | pgmoil >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk1o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmoil >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk1o$$.ppm"); +- system("ppmtopgm junk1.ppm | pgmoil >junko.ppm"); +- system("rgb3toppm junko.ppm junko.ppm junko.ppm " . +- ">junk1o.ppm"); ++ system("ppmtopgm $tmpdir/junk1.ppm | pgmoil >$tmpdir/junko.ppm"); ++ system("rgb3toppm $tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " . ++ ">$tmpdir/junk1o.ppm"); } if ($i <= 10) { my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1.ppm junk1o.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1.ppm $tmpdir/junk1o.ppm >$tmpdir/junk3.ppm"); } elsif ($i <= 20) { my $n = $spline10[$i-10]; -- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1o.ppm junk2o.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1o.ppm $tmpdir/junk2o.ppm >$tmpdir/junk3.ppm"); } else { my $n = $spline10[$i-20]; -- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk2o.ppm junk2.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk2o.ppm $tmpdir/junk2.ppm >$tmpdir/junk3.ppm"); } if ($i == 10) { -- system("ppmtopgm junk2$$.ppm | pgmoil >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk2o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmoil >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk2o$$.ppm"); +- system("ppmtopgm junk2.ppm | pgmoil >junko.ppm"); +- system("rgb3toppm junko.ppm junko.ppm junko.ppm " . +- ">junk2o.ppm"); ++ system("ppmtopgm $tmpdir/junk2.ppm | pgmoil >$tmpdir/junko.ppm"); ++ system("rgb3toppm $tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " . ++ ">$tmpdir/junk2o.ppm"); } } elsif ($mode eq $EDGE) { if ($i == 1) { -- system("ppmtopgm junk1$$.ppm | pgmedge >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk1o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmedge >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk1o$$.ppm"); +- system("ppmtopgm junk1.ppm | pgmedge >junko.ppm"); +- system("rgb3toppm junko.ppm junko.ppm junko.ppm " . +- ">junk1o.ppm"); ++ system("ppmtopgm $tmpdir/junk1.ppm | pgmedge >$tmpdir/junko.ppm"); ++ system("rgb3toppm $tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " . ++ ">$tmpdir/junk1o.ppm"); } if ($i <= 10) { my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1.ppm junk1o.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1.ppm $tmpdir/junk1o.ppm >$tmpdir/junk3.ppm"); } elsif ($i <= 20) { my $n = $spline10[$i-10]; -- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1o.ppm junk2o.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1o.ppm $tmpdir/junk2o.ppm >$tmpdir/junk3.ppm"); } else { my $n = $spline10[$i-20]; -- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk2o.ppm junk2.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk2o.ppm $tmpdir/junk2.ppm >$tmpdir/junk3.ppm"); } if ($i == 10) { -- system("ppmtopgm junk2$$.ppm | pgmedge >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk2o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmedge >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk2o$$.ppm"); +- system("ppmtopgm junk2.ppm | pgmedge >junko.ppm"); +- system("rgb3toppm junko.ppm junko.ppm junko.ppm " . +- ">junk2o.ppm"); ++ system("ppmtopgm $tmpdir/junk2.ppm | pgmedge >$tmpdir/junko.ppm"); ++ system("rgb3toppm $tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " . ++ ">$tmpdir/junk2o.ppm"); } } elsif ($mode eq $BENTLEY) { if ($i == 1) { -- system("ppmtopgm junk1$$.ppm | pgmbentley >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk1o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmbentley >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk1o$$.ppm"); +- system("ppmtopgm junk1.ppm | pgmbentley >junko.ppm"); +- system("rgb3toppm junko.ppm junko.ppm junko.ppm " . +- ">junk1o.ppm"); ++ system("ppmtopgm $tmpdir/junk1.ppm | pgmbentley >$tmpdir/junko.ppm"); ++ system("rgb3toppm $tmpdir/junko.ppm $tmpdir/junko.ppm $tmpdir/junko.ppm " . ++ ">$tmpdir/junk1o.ppm"); } if ($i <= 10) { my $n = $spline10[$i]; -- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1.ppm junk1o.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1.ppm $tmpdir/junk1o.ppm >$tmpdir/junk3.ppm"); } elsif ($i <= 20) { my $n = $spline10[$i-10]; -- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm"); +- system("ppmmix $n junk1o.ppm junk2o.ppm >junk3.ppm"); ++ system("ppmmix $n $tmpdir/junk1o.ppm $tmpdir/junk2o.ppm >$tmpdir/junk3.ppm"); } else { my $n = $spline10[$i-20]; -- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } - if ($i == 10) { -- system("ppmtopgm junk2$$.ppm | pgmbentley >junko$$.ppm"); -- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " . -- ">junk2o$$.ppm"); -+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmbentley >$tmpdir/junko$$.ppm"); -+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " . -+ ">$tmpdir/junk2o$$.ppm"); - } - } elsif ($mode eq $BLOCK) { - if ($i <= 10) { - my $n = 1 - 1.9*$spline20[$i]; -- system("pamscale $n junk1$$.ppm | " . -- "pamscale -width $width -height $height >junk3$$.ppm"); -+ system("pamscale $n $tmpdir/junk1$$.ppm | " . -+ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm"); - } elsif ($i <= 20) { - my $n = $spline10[$i-10]; -- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm"); -+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - my $n = 1 - 1.9*$spline20[31-$i]; -- system("pamscale $n junk2$$.ppm | " . -- "pamscale -width $width -height $height >junk3$$.ppm"); -+ system("pamscale $n $tmpdir/junk2$$.ppm | " . -+ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm"); - } - if ($i == 10) { -- system("cp", "junk3$$.ppm", "junk1a$$.ppm"); -- system("pamscale $n junk2$$.ppm | " . -- "pamscale -width $width -height $height >junk2a$$.ppm"); -+ system("cp", "$tmpdir/junk3$$.ppm", "$tmpdir/junk1a$$.ppm"); -+ system("pamscale $n $tmpdir/junk2$$.ppm | " . -+ "pamscale -width $width -height $height >$tmpdir/junk2a$$.ppm"); - } - } elsif ($mode eq $MIX) { - my $fade_factor = sqrt(1/($nframes-$i+1)); -- system("ppmmix $fade_factor junk1$$.ppm junk2$$.ppm >junk3$$.ppm"); -+ system("ppmmix $fade_factor $tmpdir/junk1$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm"); - } else { - print("Internal error: impossible mode value '$mode'\n"); - } - - my $outfile = sprintf("%s.%04d.ppm", $base_name, $i); -- system("cp", "junk3$$.ppm", $outfile); -+ system("cp", "$tmpdir/junk3$$.ppm", $outfile); - } - - # - # Clean up shop. - # --system("rm junk*$$.ppm"); -+system("rm $tmpdir/junk*$$.ppm"); - - exit(0); + system("ppmmix $n $tmpdir/junk2o.ppm $tmpdir/junk2.ppm " . diff --git a/netpbm.spec b/netpbm.spec index 942823d..48b1409 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -1,7 +1,7 @@ Summary: A library for handling different graphics file formats Name: netpbm -Version: 10.97.00 -Release: 4%{?dist} +Version: 10.99.00 +Release: 1%{?dist} # See copyright_summary for details License: BSD and GPLv2 and IJG and MIT and Public Domain URL: http://netpbm.sourceforge.net/ @@ -228,6 +228,9 @@ popd %doc userguide/* %changelog +* Tue Jun 28 2022 Josef Ridky - 10.99.00-1 +- New upstream release 10.99.00 (#2068865) + * Sun Feb 13 2022 Josef Ridky - 10.97.00-4 - Bump spec for new jasper