mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 02:49:00 +00:00
Merge pull request #1226 from m-holger/fuzz5
In QPDFOutlineObjectHelper detect loops in direct children
This commit is contained in:
commit
09492eea06
@ -120,6 +120,7 @@ set(CORPUS_OTHER
|
||||
68915.fuzz
|
||||
69857.fuzz
|
||||
69913.fuzz
|
||||
69969.fuzz
|
||||
)
|
||||
|
||||
set(CORPUS_DIR ${CMAKE_CURRENT_BINARY_DIR}/qpdf_corpus)
|
||||
|
BIN
fuzz/qpdf_extra/69969.fuzz
Normal file
BIN
fuzz/qpdf_extra/69969.fuzz
Normal file
Binary file not shown.
@ -173,8 +173,11 @@ FuzzHelper::doChecks()
|
||||
{
|
||||
// Get as much coverage as possible in parts of the library that
|
||||
// might benefit from fuzzing.
|
||||
std::cout << "starting testWrite\n";
|
||||
testWrite();
|
||||
std::cout << "\nstarting testPages\n\n";
|
||||
testPages();
|
||||
std::cout << "\nstarting testOutlines\n\n";
|
||||
testOutlines();
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ my @fuzzers = (
|
||||
['pngpredictor' => 1],
|
||||
['runlength' => 6],
|
||||
['tiffpredictor' => 2],
|
||||
['qpdf' => 62], # increment when adding new files
|
||||
['qpdf' => 63], # increment when adding new files
|
||||
);
|
||||
|
||||
my $n_tests = 0;
|
||||
|
@ -23,8 +23,9 @@ QPDFOutlineObjectHelper::QPDFOutlineObjectHelper(
|
||||
return;
|
||||
}
|
||||
|
||||
QPDFObjGen::set children;
|
||||
QPDFObjectHandle cur = oh.getKey("/First");
|
||||
while (!cur.isNull()) {
|
||||
while (!cur.isNull() && children.add(cur)) {
|
||||
QPDFOutlineObjectHelper new_ooh(cur, dh, 1 + depth);
|
||||
new_ooh.m->parent = std::make_shared<QPDFOutlineObjectHelper>(*this);
|
||||
m->kids.push_back(new_ooh);
|
||||
|
Loading…
Reference in New Issue
Block a user