groff/groff-1.21-CVE-2009-5081.patch
Tomáš Chvátal f473dfa0d3 - Version update to 1.22.4:
* Many fixes for hyphenation helping
  * Various build tweaks
  * See the NEWS file for details
- New signature -> update keyring file
- Remove upstream merged patches:
  * groff-multi-thread.patch
  * groff-reproducible-mdate.patch
  * groff-use-SDE.patch
- Remove groff-1.21-groffer-libexecdir.patch as upstream redid
  the autotools rules and uses configure option now
- Rebase patch groff-1.20.1-deunicode.patch
- Rebase patch groff-1.21-CVE-2009-5081.patch
- Drop patch groff-1.21-CVE-2009-5080.patch as it seems the shell
  script now properly safeguards against this
- Rebase patch 0002-documentation-for-the-locale-keyword.patch
- Recreate groff-force-locale-usage.patch for autotools buildsystem
- Add patch 0004-don-t-use-usr-bin-env-in-shebang.patch
- Remove groff_1.22.3-1.debian.diff and replace it with split
  debian patches:
  * bash-scripts.patch
  * sort-perl-hash-keys.patch
- Remove not really needed patch groff-1.20.1-destbufferoverflow.patch

OBS-URL: https://build.opensuse.org/package/show/M17N/groff?expand=0&rev=68
2019-01-04 14:23:17 +00:00

139 lines
4.7 KiB
Diff

Index: groff-1.22.4/contrib/pdfmark/pdfroff.1.man
===================================================================
--- groff-1.22.4.orig/contrib/pdfmark/pdfroff.1.man
+++ groff-1.22.4/contrib/pdfmark/pdfroff.1.man
@@ -540,7 +540,7 @@ gs \-dBATCH \-dQUIET \-dNOPAUSE \-dSAFER
.I GROFF_TMPDIR
Identifies the directory in which
.B pdfroff
-should create temporary files.
+should create a subdirectory for its temporary files.
.
If
.I \%GROFF_TMPDIR
@@ -553,7 +553,8 @@ and
.I TEMP
are considered in turn, as possible temporary file repositories.
If none of these are set, then temporary files are created
-in the current directory.
+in a subdirectory of
+.BR /tmp .
.
.TP
.I GROFF_GHOSTSCRIPT_INTERPRETER
Index: groff-1.22.4/doc/fixinfo.sh
===================================================================
--- groff-1.22.4.orig/doc/fixinfo.sh
+++ groff-1.22.4/doc/fixinfo.sh
@@ -24,7 +24,9 @@
#
# 09-2014: no more problem with texinfo 5.0 or higher
#
-t=${TMPDIR-.}/gro$$.tmp
+t="`mktemp -t groff-fixinfo.XXXXXXXXXX`" || exit
+trap 'rm -f -- "$t"' EXIT
+trap 'trap - EXIT; rm -f -- "$t"; exit 1' HUP INT QUIT TERM
cat $1 | sed '
1 {
Index: groff-1.22.4/doc/groff.texi
===================================================================
--- groff-1.22.4.orig/doc/groff.texi
+++ groff-1.22.4/doc/groff.texi
@@ -13857,9 +13857,9 @@ into a document:
@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: groff-1.22.4/gendef.sh
===================================================================
--- groff-1.22.4.orig/gendef.sh
+++ groff-1.22.4/gendef.sh
@@ -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
@@ -45,8 +43,6 @@ EOF
test -r $file && cmp -s $t $file || cp $t $file
-rm -f $t
-
exit 0
# eof
Index: groff-1.22.4/src/roff/groff/pipeline.c
===================================================================
--- groff-1.22.4.orig/src/roff/groff/pipeline.c
+++ groff-1.22.4/src/roff/groff/pipeline.c
@@ -379,6 +379,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);
Index: groff-1.22.4/contrib/groffer/main_subs.pl
===================================================================
--- groff-1.22.4.orig/contrib/groffer/main_subs.pl
+++ groff-1.22.4/contrib/groffer/main_subs.pl
@@ -1244,7 +1244,7 @@ sub main_temp {
our $fh_stdin;
our $tmp_cat;
our $tmp_stdin;
- my $template = 'groffer_' . "$$" . '_XXXX';
+ my $template = 'groffer_' . "$$" . '_XXXXXXXXXX';
foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'},
$ENV{'TEMPDIR'}, File::Spec->catfile($ENV{'HOME'}, 'tmp')) {
if ($_ && -d $_ && -w $_) {
@@ -1276,12 +1276,12 @@ sub main_temp {
# further argument: SUFFIX => '.sh'
if ($Debug{'KEEP'}) {
- ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', DIR => $tmpdir);
- ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', DIR => $tmpdir);
+ ($fh_cat, $tmp_cat) = tempfile(',cat_XXXXXXXXXX', DIR => $tmpdir);
+ ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXXXXXXXX', DIR => $tmpdir);
} else {
- ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', UNLINK => 1,
+ ($fh_cat, $tmp_cat) = tempfile(',cat_XXXXXXXXXX', UNLINK => 1,
DIR => $tmpdir);
- ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', UNLINK => 1,
+ ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXXXXXXXX', UNLINK => 1,
DIR => $tmpdir);
}
} # main_temp()
Index: groff-1.22.4/contrib/groffer/roff2.pl
===================================================================
--- groff-1.22.4.orig/contrib/groffer/roff2.pl
+++ groff-1.22.4/contrib/groffer/roff2.pl
@@ -123,7 +123,7 @@ if ($Has_Groffer) {
last;
}
}
- my $template = $Name . '_XXXX';
+ my $template = $Name . '_XXXXXXXXXX';
my ($fh, $stdin);
if ($tempdir) {
($fh, $stdin) = tempfile($template, UNLINK => 1, DIR => $tempdir) ||