groff/groff-1.21-CVE-2009-5081.patch

71 lines
2.1 KiB
Diff
Raw Normal View History

Index: b/contrib/pdfmark/pdfroff.1.man
===================================================================
--- a/contrib/pdfmark/pdfroff.1.man
+++ b/contrib/pdfmark/pdfroff.1.man
@@ -619,7 +619,7 @@ gs \-dBATCH \-dQUIET \-dNOPAUSE \-dSAFER
.I GROFF_TMPDIR
Identifies the directory in which
.I pdfroff
-should create temporary files.
+should create a subdirectory for its temporary files.
- Version bump to latest release 1.22.3: * X11 resources for `gxditview', which were previously installed in /usr/X11/lib/X11/app-defaults no matter which `prefix' was set, are now installed in appresdir=$prefix/lib/X11/app-defaults. If `appresdir' is not a standard X11 resource directory, the environment variable XFILESEARCHPATH should be set to this path. The standard default directories depends on the system `libXt'. * This new preprocessor (contributed by Bernd Warken) allows embedding of code for GNU LilyPond (http://www.lilypond.org), a music typesetter. The data gets automatically processed and embedded as EPS images. * Bernd Warken contributed a new preprocessor to handle Perl code that can be evaluated and then processed by groff. * Another preprocessor from Bernd Warken to pretty-print Pinyin syllables like `guo2wang2' as `guówáng'. * The pdfroff utility script now activates its `--no-toc-relocation' option by default, unless a request similar to: .if !\n[PHASE] .tm pdfroff-option:set toc_relocation=enabled is invoked during input file processing; (`.if !\n[PHASE] ...' ensures that the effect of the `.tm' request is restricted to the document setup phase of processing, as pdfroff sets it to 1 or 2 in the output phase, but leaves it unset in the setup phase). The bundled `spdf.tmac' macro package, which implicitly activates `-mpdfmark' for `ms' macro users, ensures that TOC relocation is appropriately enabled, when the `.TC' macro is invoked. * The -mom macro package now has full support for eqn, pic, and tbl, as well as captioning and labelling of pdf images and preprocessor output. Lists of Figures, Equations, and Tables can now be autogenerated. PDF_IMAGE has a new FRAME option. * A French introduction to the -me macro package has been added (file `meintro_fr.me'). OBS-URL: https://build.opensuse.org/package/show/M17N/groff?expand=0&rev=54
2015-02-04 13:11:48 +01:00
.
If
.I \%GROFF_TMPDIR
Index: b/doc/groff.texi
===================================================================
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -16005,9 +16005,9 @@ The following code fragment introduces t
@pindex perl
@Example
.sy perl -e 'printf ".nr H %d\\n.nr M %d\\n.nr S %d\\n",\
- (localtime(time))[2,1,0]' > /tmp/x\n[$$]
-.so /tmp/x\n[$$]
-.sy rm /tmp/x\n[$$]
+ (localtime(time))[2,1,0]' > timefile\n[$$]
+.so timefile\n[$$]
+.sy rm timefile\n[$$]
\nH:\nM:\nS
@endExample
Index: b/gendef.sh
===================================================================
--- a/gendef.sh
+++ b/gendef.sh
- Version bump to latest release 1.22.3: * X11 resources for `gxditview', which were previously installed in /usr/X11/lib/X11/app-defaults no matter which `prefix' was set, are now installed in appresdir=$prefix/lib/X11/app-defaults. If `appresdir' is not a standard X11 resource directory, the environment variable XFILESEARCHPATH should be set to this path. The standard default directories depends on the system `libXt'. * This new preprocessor (contributed by Bernd Warken) allows embedding of code for GNU LilyPond (http://www.lilypond.org), a music typesetter. The data gets automatically processed and embedded as EPS images. * Bernd Warken contributed a new preprocessor to handle Perl code that can be evaluated and then processed by groff. * Another preprocessor from Bernd Warken to pretty-print Pinyin syllables like `guo2wang2' as `guówáng'. * The pdfroff utility script now activates its `--no-toc-relocation' option by default, unless a request similar to: .if !\n[PHASE] .tm pdfroff-option:set toc_relocation=enabled is invoked during input file processing; (`.if !\n[PHASE] ...' ensures that the effect of the `.tm' request is restricted to the document setup phase of processing, as pdfroff sets it to 1 or 2 in the output phase, but leaves it unset in the setup phase). The bundled `spdf.tmac' macro package, which implicitly activates `-mpdfmark' for `ms' macro users, ensures that TOC relocation is appropriately enabled, when the `.TC' macro is invoked. * The -mom macro package now has full support for eqn, pic, and tbl, as well as captioning and labelling of pdf images and preprocessor output. Lists of Figures, Equations, and Tables can now be autogenerated. PDF_IMAGE has a new FRAME option. * A French introduction to the -me macro package has been added (file `meintro_fr.me'). OBS-URL: https://build.opensuse.org/package/show/M17N/groff?expand=0&rev=54
2015-02-04 13:11:48 +01:00
@@ -33,11 +33,9 @@ do
#define $def"
done
-# Use $TMPDIR if defined. Default to cwd, for non-Unix systems
-# which don't have /tmp on each drive (we are going to remove
-# the file before we exit anyway). Put the PID in the basename,
-# since the extension can only hold 3 characters on MS-DOS.
-t=${TMPDIR-.}/gro$$.tmp
+t="`mktemp -t groff-gendef.XXXXXXXXXX`" || exit
+trap 'rm -f -- "$t"' EXIT
+trap 'trap - EXIT; rm -f -- "$t"; exit 1' HUP INT QUIT TERM
sed -e 's/=/ /' >$t <<EOF
$defs
- Version bump to latest release 1.22.3: * X11 resources for `gxditview', which were previously installed in /usr/X11/lib/X11/app-defaults no matter which `prefix' was set, are now installed in appresdir=$prefix/lib/X11/app-defaults. If `appresdir' is not a standard X11 resource directory, the environment variable XFILESEARCHPATH should be set to this path. The standard default directories depends on the system `libXt'. * This new preprocessor (contributed by Bernd Warken) allows embedding of code for GNU LilyPond (http://www.lilypond.org), a music typesetter. The data gets automatically processed and embedded as EPS images. * Bernd Warken contributed a new preprocessor to handle Perl code that can be evaluated and then processed by groff. * Another preprocessor from Bernd Warken to pretty-print Pinyin syllables like `guo2wang2' as `guówáng'. * The pdfroff utility script now activates its `--no-toc-relocation' option by default, unless a request similar to: .if !\n[PHASE] .tm pdfroff-option:set toc_relocation=enabled is invoked during input file processing; (`.if !\n[PHASE] ...' ensures that the effect of the `.tm' request is restricted to the document setup phase of processing, as pdfroff sets it to 1 or 2 in the output phase, but leaves it unset in the setup phase). The bundled `spdf.tmac' macro package, which implicitly activates `-mpdfmark' for `ms' macro users, ensures that TOC relocation is appropriately enabled, when the `.TC' macro is invoked. * The -mom macro package now has full support for eqn, pic, and tbl, as well as captioning and labelling of pdf images and preprocessor output. Lists of Figures, Equations, and Tables can now be autogenerated. PDF_IMAGE has a new FRAME option. * A French introduction to the -me macro package has been added (file `meintro_fr.me'). OBS-URL: https://build.opensuse.org/package/show/M17N/groff?expand=0&rev=54
2015-02-04 13:11:48 +01:00
@@ -45,8 +43,6 @@ EOF
test -r $file && cmp -s $t $file || cp $t $file
-rm -f $t
-
exit 0
# eof
Index: b/src/roff/groff/pipeline.c
===================================================================
--- a/src/roff/groff/pipeline.c
+++ b/src/roff/groff/pipeline.c
@@ -378,6 +378,7 @@ int run_pipeline(int ncommands, char ***
/* Don't use 'tmpnam' here: Microsoft's implementation yields unusable
file names if current directory is on network share with read-only
root. */
+#error AUDIT: This code is only compiled under DOS
tmpfiles[0] = tempnam(tmpdir, NULL);
tmpfiles[1] = tempnam(tmpdir, NULL);