Skip to content
forked from qpdf/qpdf

Commit

Permalink
Add additional fuzz test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
m-holger committed Sep 20, 2024
1 parent 21f176d commit 477fbd9
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 1 deletion.
3 changes: 3 additions & 0 deletions fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ set(CORPUS_OTHER
70306b.fuzz
71624.fuzz
71689.fuzz
99999a.fuzz
99999b.fuzz
99999c.fuzz
)

set(CORPUS_DIR ${CMAKE_CURRENT_BINARY_DIR}/qpdf_corpus)
Expand Down
63 changes: 63 additions & 0 deletions fuzz/qpdf_extra/99999a.fuzz
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
%PDF-1.5
%����
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
>>
endobj
2 0 obj
<<
/Count 6 Ri
0K/ds [3 0 R]
/Type /Pages
>>
endobj
3 0 obj
<<
/Resources <<
/Font <<
/F1 5 0 R
>>
>>
/MediaBox [0 0 795 842]
/Parent 2 0 R
/Contents 4 0 R
/Type /Page
=>
endobj
4 0 obj
<<444444444444444444444444 1 Tr /F1 30 Tf 350 750 Td (foobar) Tj ET
endstream
endobj
5 0 obj
<<
/Name /F1
/BaseFont /Helvetica
/Type /Font
/Subtype /Type1
>>
e�dobj
6 0 obj
<< /Length 6 0 R >>
stre444444444444444444444444444444<<>>
endobj
xref
0 8
0000000000 65535 f
0000000015 00000 n
0000000066 00000 n
0000000130 00000 n
0000000269 00000 n
0000000362 00000 n
000000��������00 n
0000000500 00000 n
trailer
<<
/Size 713115528178535
/Root 1 0 R
/Info 7 0 R
>>
startxref
520
%%EOF
Binary file added fuzz/qpdf_extra/99999b.fuzz
Binary file not shown.
Binary file added fuzz/qpdf_extra/99999c.fuzz
Binary file not shown.
2 changes: 1 addition & 1 deletion fuzz/qtest/fuzz.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ my $td = new TestDriver('fuzz');

my $qpdf_corpus = $ENV{'QPDF_FUZZ_CORPUS'} || die "must set QPDF_FUZZ_CORPUS";

my $n_qpdf_files = 79; # increment when adding new files
my $n_qpdf_files = 82; # increment when adding new files

my @fuzzers = (
['ascii85' => 1],
Expand Down

0 comments on commit 477fbd9

Please sign in to comment.