mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-31 10:58:25 +00:00
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.
This commit is contained in:
parent
e999bbae43
commit
abb3191c32
@ -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);
|
||||
|
8
qpdf/qtest/qpdf/issue-147.out
Normal file
8
qpdf/qtest/qpdf/issue-147.out
Normal file
@ -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
|
2
qpdf/qtest/qpdf/issue-147.pdf
Normal file
2
qpdf/qtest/qpdf/issue-147.pdf
Normal file
@ -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
|
7
qpdf/qtest/qpdf/issue-148.out
Normal file
7
qpdf/qtest/qpdf/issue-148.out
Normal file
@ -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
|
BIN
qpdf/qtest/qpdf/issue-148.pdf
Normal file
BIN
qpdf/qtest/qpdf/issue-148.pdf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user