groff/groff-1.21-CVE-2009-5044.patch
Michal Vyskocil e090aff5a2 - update to 1.21 a bugfix release
* use new groff_1.21-6.debian.diff
  * refresh libexecdir and pdfroff patch
- fix FATE#311297: Get rid of SuSEconfig.groff
  * removed

OBS-URL: https://build.opensuse.org/package/show/M17N/groff?expand=0&rev=19
2011-06-27 12:59:56 +00:00

69 lines
2.5 KiB
Diff

---
contrib/pdfmark/pdfroff.sh | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
Index: groff-1.21/contrib/pdfmark/pdfroff.sh
===================================================================
--- groff-1.21.orig/contrib/pdfmark/pdfroff.sh 2010-12-31 08:33:09.000000000 +0100
+++ groff-1.21/contrib/pdfmark/pdfroff.sh 2011-06-27 13:13:32.807924590 +0200
@@ -157,7 +157,7 @@
# as default), and schedule removal of only the temporary files.
#
GROFF_TMPDIR=${TMPDIR}
- trap "rm -f ${GROFF_TMPDIR}/pdf$$.*" 0
+ trap "rm -f ${GROFF_TMPDIR}/*" 0
fi
#
# In the case of abnormal termination events, we force an exit
@@ -168,14 +168,16 @@
#
trap "exit 1" 1 2 3 13 15
#
- WRKFILE=${GROFF_TMPDIR}/pdf$$.tmp
+ WRKFILE=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.tmp`
#
- REFCOPY=${GROFF_TMPDIR}/pdf$$.cmp
- REFFILE=${GROFF_TMPDIR}/pdf$$.ref
+ REFCOPY=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.cmp`
+ REFFILE=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.ref`
#
CS_DATA=""
- TC_DATA=${GROFF_TMPDIR}/pdf$$.tc
- BD_DATA=${GROFF_TMPDIR}/pdf$$.ps
+ TC_DATA=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.tc`
+ BD_DATA=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.ps`
+
+ STREAMFILE=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.in`
#
# Initialise 'groff' format control settings,
# to discriminate table of contents and document body formatting passes.
@@ -328,7 +330,7 @@
;;
--stylesheet)
- STYLESHEET="$OPTARG" CS_DATA=${GROFF_TMPDIR}/pdf$$.cs
+ STYLESHEET="$OPTARG" CS_DATA=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.cs`
;;
--no-toc-relocation)
@@ -361,7 +363,7 @@
# so set up a mechanism to achieve this, for ALL 'groff' passes.
#
- | -i*)
- STREAM="$CAT ${GROFF_TMPDIR}/pdf$$.in |"
+ STREAM="$CAT ${STREAMFILE} |"
test "$1" = "-" && INPUT_FILES="$INPUT_FILES $1" \
|| GROFF_STYLE="$GROFF_STYLE $1"
;;
@@ -433,8 +435,8 @@
# or if no input files are specified, then we need to capture STDIN,
# so we can replay it into each 'groff' processing pass.
#
- test -z "$INPUT_FILES" && STREAM="$CAT ${GROFF_TMPDIR}/pdf$$.in |"
- test -n "$STREAM" && $CAT > ${GROFF_TMPDIR}/pdf$$.in
+ test -z "$INPUT_FILES" && STREAM="$CAT ${STREAMFILE} |"
+ test -n "$STREAM" && $CAT > ${STREAMFILE}
#
# Unless reference resolution is explicitly suppressed,
# we initiate it by touching the cross reference dictionary file,