forked from pool/netpbm
Petr Gajdos
20145d3c7b
* asciitopgm: fix bug: memory corruption on too-long lines. * asciitopgm: fix bug: improper handling of blank lines. * pngtopnm: fix bug: -verbose reports history chunk present when it's really a palette. * bmptopnm: Don't crash on invalid zero value of image height in the BMP header of a compressed file. * bmptopnm: don't crash on large invalid value of 'colorsused' in the BMP header. * ilbmtoppm: Don't crash on image that has a transparent color index, but no color map. OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=29
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;
|
|
}
|