Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 137890 Details for
Bug 201042
net-print/cups < 1.2.12-r4 insecure temporary file creation in pdftops (CVE-2007-6358)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pdftops-1.10-1.20.patch
pdftops-1.10-1.20.patch (text/plain), 1.51 KB, created by
Robert Buchholz (RETIRED)
on 2007-12-06 17:10:05 UTC
(
hide
)
Description:
pdftops-1.10-1.20.patch
Filename:
MIME Type:
Creator:
Robert Buchholz (RETIRED)
Created:
2007-12-06 17:10:05 UTC
Size:
1.51 KB
patch
obsolete
>--- pdftops-1.10 2007-12-06 18:08:44.000000000 +0100 >+++ pdftops-1.20 2007-12-03 16:33:37.000000000 +0100 >@@ -5,6 +5,8 @@ > # Initial implementation > # 1.10 - 2006-09-27/Bl > # Alternatively, use Adobe Reader in place of Xpdf's pdftops >+# 1.20 - 2007-12-03/Bl >+# Safe temp file creation (fix gentoo bug # 201042) > # > # Copyright: Helge Blischke / SRZ Berlin 2004-2006 > # This program is free seoftware and governed by the GNU Public License Version 2. >@@ -93,7 +95,7 @@ > $default_app = 'use-pdftops'; # the default if both are configured > # ---------------------------------------------------------------------------------- > >-use File::Copy; >+use File::Temp qw( tempfile ); > > # > # Check which app to use - pdftops or acroread >@@ -149,15 +151,21 @@ > # as the PDF consumer needs a seekable input. > if (! defined $pdffile) > { >- my $tmpfile = $ENV{TMPDIR} . "pdfin.$$.tmp"; >- open (TEMP, ">$tmpfile") || die ("ERROR: pdftops wrapper: $tmpfile: $!\n"); >- if (! copy (STDIN, TEMP)) >+ my $template = "pdfinXXXXXX"; >+ my $tmpdir = $ENV{TMPDIR}; >+ my ($bytes, $buffer); >+ my ($tmpfh, $tmpfile) = tempfile ($template, OPEN => 1, DIR => $tmpdir, UNLINK => 0, SUFFIX => '.tmp'); >+ while (($bytes = read (STDIN, $buffer, 1024)) > 0) > { >- close (TEMP); >+ print $tmpfh "$buffer"; >+ } >+ if ($bytes < 0) >+ { >+ close ($tmpfh); > unlink $tmpfile; > die ("ERROR: pdftops wrapper: $tmpfile: $!\n"); > } >- close (TEMP); >+ close ($tmpfh); > $pdffile = $tmpfile; > $delete_input = 1; # for deleting the temp file after converting > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 201042
:
137630
| 137890