#! /bin/sh /usr/share/dpatch/dpatch-run ## 52_feynmf-perl-sec-fix.dpatch by Kevin B. McCarty ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: secure tmp file handling @DPATCH@ --- ./texmf-dist/source/latex/feynmf/feynmf.pl.orig +++ ./texmf-dist/source/latex/feynmf/feynmf.pl @@ -270,10 +270,11 @@ my @tfm = @_; # Prepare a fake temporary PL file # (/dev/null won't do, because the font must not be empty): - my ($pl) = "/tmp/feynmf$$.pl"; + my ($pl) = `/bin/tempfile -p feynmf -s .pl`; my ($tfm); $pltotf_prog or die "feynmf: fatal: pltopf programm required unless -notfm\n"; + chop ($pl); open (PL, ">$pl") or die "feynmf: can't open temporary file $pl: $!\n"; push @temporay_files, $pl; print PL <<__END_PL__; @@ -373,7 +374,7 @@ maybe_run "$gftopk_prog $gf" if $gftopk_prog; } } - close (); + close (LOG); } } }