2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 19:08:59 +00:00

Include tests for other infinite loop bugs

fixes #117
fixes #118
fixes #119
fixes #120

Several other infinite loop bugs were fixed by previous changes.
Include their test files in the test suite.
This commit is contained in:
Jay Berkenbilt 2017-07-26 06:19:19 -04:00
parent 12db09898e
commit ac3c81a8ed
10 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2017-07-26 Jay Berkenbilt <ejb@ql.org> 2017-07-26 Jay Berkenbilt <ejb@ql.org>
* Fixes to infinite loops below also fix problems reported in
other issues and cover CVE-2017-11624, CVE-2017-11625,
CVE-2017-11626, and CVE-2017-11627.
* Don't attempt to interpret syntactic keywords (like R and * Don't attempt to interpret syntactic keywords (like R and
endobj) found while parsing content streams. endobj) found while parsing content streams.

View File

@ -206,7 +206,7 @@ $td->runtest("remove page we don't have",
show_ntests(); show_ntests();
# ---------- # ----------
$td->notify("--- Miscellaneous Tests ---"); $td->notify("--- Miscellaneous Tests ---");
$n_tests += 82; $n_tests += 86;
$td->runtest("qpdf version", $td->runtest("qpdf version",
{$td->COMMAND => "qpdf --version"}, {$td->COMMAND => "qpdf --version"},
@ -225,6 +225,10 @@ foreach my $d (
["99b", "object 0"], ["99b", "object 0"],
["100","xref reconstruction loop"], ["100","xref reconstruction loop"],
["101", "resolve for exception text"], ["101", "resolve for exception text"],
["117", "other infinite loop"],
["118", "other infinite loop"],
["119", "other infinite loop"],
["120", "other infinite loop"],
) )
{ {
my ($n, $description) = @$d; my ($n, $description) = @$d;

View File

@ -0,0 +1,6 @@
WARNING: issue-117.pdf: file is damaged
WARNING: issue-117.pdf: can't find startxref
WARNING: issue-117.pdf: Attempting to reconstruct cross-reference table
WARNING: issue-117.pdf (file position 66): loop detected resolving object 2 0
WARNING: issue-117.pdf (object 2 0, file position 67): attempting to recover stream length
attempt to make a stream into a direct object

Binary file not shown.

View File

@ -0,0 +1,2 @@
WARNING: issue-118.pdf (file position 732): loop detected resolving object 2 0
issue-118.pdf (xref stream: object 8 0, file position 732): supposed object stream 2 is not a stream

Binary file not shown.

View File

@ -0,0 +1,2 @@
WARNING: issue-119.pdf (file position 336): loop detected resolving object 4 0
issue-119.pdf (file position 298): dictionary key is not not a name token

Binary file not shown.

View File

@ -0,0 +1,2 @@
WARNING: issue-120.pdf (file position 85): loop detected resolving object 3 0
issue-120.pdf (object 6 0, file position 85): supposed object stream 3 is not a stream

Binary file not shown.