diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-08-29 04:07:20 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-08-29 04:28:12 +0200 |
commit | abb3191c32adb982a0a80e1b76976d34f4df3788 (patch) | |
tree | c5f2d4cdf0bf40af73675eaecca7dba43524a792 /qpdf | |
parent | e999bbae43fc4fd0bdf24c3117574eb75216f0d9 (diff) | |
download | qpdf-abb3191c32adb982a0a80e1b76976d34f4df3788.tar.zst |
Add tests for previous memory issues
Now that the test suite runs clean with address sanitizer, add some
test cases that previously were used to expose memory errors.
Diffstat (limited to 'qpdf')
-rw-r--r-- | qpdf/qtest/qpdf.test | 2 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-147.out | 8 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-147.pdf | 2 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-148.out | 7 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/issue-148.pdf | bin | 0 -> 87 bytes |
5 files changed, 19 insertions, 0 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index 94e24908..5a28a91b 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -222,6 +222,8 @@ my @bug_tests = ( ["141b", "/W entry size 0", 2], ["143", "self-referential ostream", 3], ["146", "very deeply nested array", 2], + ["147", "previously caused memory error", 2], + ["148", "free memory on bad flate", 2], ["149", "xref prev pointer loop", 3], ); $n_tests += scalar(@bug_tests); diff --git a/qpdf/qtest/qpdf/issue-147.out b/qpdf/qtest/qpdf/issue-147.out new file mode 100644 index 00000000..d64fbd3a --- /dev/null +++ b/qpdf/qtest/qpdf/issue-147.out @@ -0,0 +1,8 @@ +WARNING: issue-147.pdf: can't find PDF header +WARNING: issue-147.pdf: file is damaged +WARNING: issue-147.pdf: can't find startxref +WARNING: issue-147.pdf: Attempting to reconstruct cross-reference table +WARNING: issue-147.pdf (trailer, file position 9): expected dictionary key but found non-name object; inserting key /QPDFFake1 +WARNING: issue-147.pdf (object 62 0, file position 88): expected endobj +WARNING: issue-147.pdf (trailer, file position 90): invalid /ID in trailer dictionary +issue-147.pdf: invalid password diff --git a/qpdf/qtest/qpdf/issue-147.pdf b/qpdf/qtest/qpdf/issue-147.pdf new file mode 100644 index 00000000..f3631bfd --- /dev/null +++ b/qpdf/qtest/qpdf/issue-147.pdf @@ -0,0 +1,2 @@ +trailer<<<>/Encrypt 62 0 R>> +62 0 obj<</Filter/Standard/Length 160/O<>/P 0/R 3/U<>/V 2>>0 0
\ No newline at end of file diff --git a/qpdf/qtest/qpdf/issue-148.out b/qpdf/qtest/qpdf/issue-148.out new file mode 100644 index 00000000..9cc9ac83 --- /dev/null +++ b/qpdf/qtest/qpdf/issue-148.out @@ -0,0 +1,7 @@ +WARNING: issue-148.pdf: can't find PDF header +WARNING: issue-148.pdf (xref stream: object 8 0, file position 26): stream dictionary lacks /Length key +WARNING: issue-148.pdf (xref stream: object 8 0, file position 73): attempting to recover stream length +WARNING: issue-148.pdf (xref stream: object 8 0, file position 73): recovered stream length: 2 +WARNING: issue-148.pdf (xref stream: object 8 0, file position 85): expected endobj +WARNING: issue-148.pdf (file position 73): error decoding stream data for object 8 0: stream inflate: inflate: data: incorrect header check +getStreamData called on unfilterable stream diff --git a/qpdf/qtest/qpdf/issue-148.pdf b/qpdf/qtest/qpdf/issue-148.pdf Binary files differnew file mode 100644 index 00000000..42e6212a --- /dev/null +++ b/qpdf/qtest/qpdf/issue-148.pdf |