forked from pool/netpbm
Petr Gajdos
93f2cd1c3c
* ppmtompeg: fix crash with free of unallocated memory. * Build: don't expect snprintf() to exist. * Build: don't use <strings.h> or bzero(). OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=27
48 lines
942 B
Diff
48 lines
942 B
Diff
--- editor/pnmindex.csh
|
|
+++ editor/pnmindex.csh
|
|
@@ -88,7 +88,7 @@
|
|
goto usage
|
|
endif
|
|
|
|
-set tmpfile=/tmp/pi.tmp.$$
|
|
+set tmpfile=.pi.tmp.$$
|
|
rm -f $tmpfile
|
|
set maxformat=PBM
|
|
|
|
--- editor/ppmquantall.csh
|
|
+++ editor/ppmquantall.csh
|
|
@@ -34,8 +34,8 @@
|
|
set heights=( $heights `sed '1d; s/.* //; 2q' $i` )
|
|
end
|
|
|
|
-set all=/tmp/pqa.all.$$
|
|
-rm -f $all
|
|
+set all=.pqa.all.$$
|
|
+
|
|
pnmcat -topbottom -jleft -white $files | ppmquant -quiet $newcolors > $all
|
|
if ( $status != 0 ) exit $status
|
|
|
|
--- generator/ppmrainbow
|
|
+++ generator/ppmrainbow
|
|
@@ -47,7 +47,13 @@
|
|
push @colorlist, $ARGV[0];
|
|
}
|
|
|
|
-my $tmpprefix = $tmpdir . "/$myname.$$.";
|
|
+my $mytmpdir;
|
|
+chomp($mytmpdir = `mktemp -d $tmpdir/ppmrainbow.XXXXXX`);
|
|
+if ($? >> 8) {
|
|
+ die "Can't create tmpdir";
|
|
+}
|
|
+
|
|
+my $tmpprefix = $mytmpdir . "/file.";
|
|
|
|
my $widthRemaining;
|
|
my $n;
|
|
@@ -79,4 +85,5 @@
|
|
|
|
END {
|
|
unlink @outlist if @outlist;
|
|
+ rmdir $mytmpdir if -d $mytmpdir;
|
|
}
|