From 477fbd9839b0c876bfafdcc26b492548f253b2bb Mon Sep 17 00:00:00 2001 From: m-holger Date: Fri, 20 Sep 2024 14:56:57 +0100 Subject: [PATCH] Add additional fuzz test cases --- fuzz/CMakeLists.txt | 3 ++ fuzz/qpdf_extra/99999a.fuzz | 63 ++++++++++++++++++++++++++++++++++++ fuzz/qpdf_extra/99999b.fuzz | Bin 0 -> 81 bytes fuzz/qpdf_extra/99999c.fuzz | Bin 0 -> 13650 bytes fuzz/qtest/fuzz.test | 2 +- 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 fuzz/qpdf_extra/99999a.fuzz create mode 100644 fuzz/qpdf_extra/99999b.fuzz create mode 100644 fuzz/qpdf_extra/99999c.fuzz diff --git a/fuzz/CMakeLists.txt b/fuzz/CMakeLists.txt index 73d886c0..adb68cd4 100644 --- a/fuzz/CMakeLists.txt +++ b/fuzz/CMakeLists.txt @@ -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) diff --git a/fuzz/qpdf_extra/99999a.fuzz b/fuzz/qpdf_extra/99999a.fuzz new file mode 100644 index 00000000..026c7427 --- /dev/null +++ b/fuzz/qpdf_extra/99999a.fuzz @@ -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 \ No newline at end of file diff --git a/fuzz/qpdf_extra/99999b.fuzz b/fuzz/qpdf_extra/99999b.fuzz new file mode 100644 index 0000000000000000000000000000000000000000..288a6b5c2898c8c9c44be73b6e0b3bdee5e2cb1b GIT binary patch literal 81 zcmZ={XDBX7EGnreN=@T6u;4M|;W1M%R7m40DN4-DNiE{yva!+C56-Mg`qwNJR~7cfk4tZ z=l+yRlDqBh3_TE5V5{oZt$WWs=iGC?d(KfLn^}m_xDk$g`p+NzT{uJ&22qJuItr&! zB&@8|o37KYKXEIB!tFYt2@}3=lRZMIktCXFk|Opanq`;=wCwZ!mvnrRKuqS<=?yD*!sYTDo&x~2`itLxSfeR|@I z@ho+CJX;@rH<=jXfu1~rr>Ft_e3|*>kxtiXcbTN@OPA=SOByOvlZ=eK@uQGEG7{km zmk34v@<0Fhe?pNBrhjTE1R_Jd3#C#aLX??u+gtG34Z?1rA(JCI^vJ*sFzrV!mTTAzXe>I&*E;L25Ei*Co-+gr?G@N>!a|2}3txYGPbf$Jz2&Pp?f< zRkvDI)r6(0mZqv^621-iPT)ObOt$S+PRp*})hP3BCUj@7Kvx5XFir6XLzp`JK|6F& zb!gXI_@?O~;V7ye;R{|9mMg`tz?|j0+Z9YzK{Xizm4f@I%Xk;y0E)Rc&`cHtCbdOb zbt`pe)_WueVxu7U2{Eb0zO5vF3u&}nAVVsVl5;!WX&W^~Dmx=n+@Q8oV#v9K9+3}x z;ti>%T*0^qQQ|>1L?Q&6K-3{LDuI>E0ZV|K4zZ+)E8lwk%lVgcmeY_Q0(-PjWx53> zp^ss{Tsb2$TU_gyc76M^_$&|uWT-3@V2d2Gt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jj zK8%Qdv$R7Sj(ZCb<~lbEsbnBS2pS`@kSzU;xonp5#?&|DsWCw;LXV~uw^YhnsGf-H zMiQ>scJa@TJY5LQknD(-y++BaKxmz^Tqr+NvaBI?5R>vKCeCO=Hk~Eh`?KSIS{Mp{ zfN>xzS$~1~M_FLOc*;nF!W&>OzhqmIUowEgE*Xp26=NN{Vgh1UTrB)D(8}b>TDjc$ zWp7YQKf^TV3x@jgvuFPDIGW~^^wv+4y=Bp)Tmlo5JbHif!;k)n^GI22_a*#$^%p%W zCl@J7GI)ZaL$G#0n6kl4J{zScC?4xW#SzI{PBPmZaLGvP9ZJ|kUYPLQ@`N*p+3cpb@^~*^N%P1!6Y_;ps=b*>y5? z!YxbR$O6@fO)`6S$p_V~xDKNbQhn9h1Nyx34LhWv%Jfzz)sFD2CKCTr;-1MCr3}^x z*0izh%^97UAyG9B5q%xj9oOIs_IzBUP(%XL2)t$($RU10lWvW9t#kgNlk0rr>(bqU z z3HUE;s<2U^h+ljV5;~nqv6U;x8G)-I$*pV)c*WsBGMyIkc*MBOlH8#;MwkzRG!x{W z`bk2b_Ef5$q>HMA$#}S6$U>c0`M!W#6*l1K#XT?ZV`n@XD(?CG&;tgBz{)@xl6}Eh z67OsQ=dhaCcQ;rbg6BYas$`fA6qTpfpq8XpfCzPeRHYOURzjBrh!}JnEL4>JDAaBF z{rcwM2IA)^hr_&!pd9bC=g8-?RtwIU9skA^%sMwxhc5*^hQ%bO# zd~L3+qe)g(Uq&N=-#<{>P+{}o$Nx0=YfOiSv*IujOMdkoj g>)MbeXu2M38!jVG7#FV%h7y36s11giR8bxLzi)vX#Q*>R literal 0 HcmV?d00001 diff --git a/fuzz/qtest/fuzz.test b/fuzz/qtest/fuzz.test index 02dbc98a..51a35532 100644 --- a/fuzz/qtest/fuzz.test +++ b/fuzz/qtest/fuzz.test @@ -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],