2
by Norbert Preining
* first upload to unstable, sponsored by |
1 |
#! /bin/sh /usr/share/dpatch/dpatch-run |
2 |
## 52_feynmf-perl-sec-fix.dpatch by Kevin B. McCarty |
|
3 |
## |
|
4 |
## All lines beginning with `## DP:' are a description of the patch. |
|
5 |
## DP: secure tmp file handling |
|
6 |
||
7 |
@DPATCH@ |
|
8 |
--- ./texmf-dist/source/latex/feynmf/feynmf.pl.orig
|
|
9 |
+++ ./texmf-dist/source/latex/feynmf/feynmf.pl
|
|
10 |
@@ -270,10 +270,11 @@ |
|
11 |
my @tfm = @_; |
|
12 |
# Prepare a fake temporary PL file |
|
13 |
# (/dev/null won't do, because the font must not be empty): |
|
14 |
- my ($pl) = "/tmp/feynmf$$.pl";
|
|
15 |
+ my ($pl) = `/bin/tempfile -p feynmf -s .pl`;
|
|
16 |
my ($tfm); |
|
17 |
$pltotf_prog |
|
18 |
or die "feynmf: fatal: pltopf programm required unless -notfm\n"; |
|
19 |
+ chop ($pl);
|
|
20 |
open (PL, ">$pl") or die "feynmf: can't open temporary file $pl: $!\n"; |
|
21 |
push @temporay_files, $pl; |
|
22 |
print PL <<__END_PL__; |
|
23 |
@@ -373,7 +374,7 @@ |
|
24 |
maybe_run "$gftopk_prog $gf" if $gftopk_prog; |
|
25 |
} |
|
26 |
} |
|
27 |
- close (<LOG>);
|
|
28 |
+ close (LOG);
|
|
29 |
} |
|
30 |
} |
|
31 |
} |