1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Last-Update: 2011-08-06
Description: Checks if file is usable before referencing it
diff --git a/html2ps b/html2ps
index 2876275..66c1bfb 100755
--- a/html2ps
+++ b/html2ps
@@ -495,6 +495,8 @@ die "Ghostscript is required to generate DSC PostScript\n"
die "Ghostscript is required to generate cross references\n"
if($opt_R && !$package{'Ghostscript'});
$tmpname=$posix?POSIX::tmpnam():"h2p_$$";
+sysopen TMP, $tmpname, O_RDWR|O_CREAT|O_EXCL, 0600 or die "$!";
+close TMP;
($scr=$tmpname)=~/\w+$/;
$tempdir=$`;
|