mirror of
https://github.com/qpdf/qpdf.git
synced 2024-06-08 05:10:53 +00:00
Fix loop in QPDFOutlineDocumentHelper (fuzz issue 30507)
This commit is contained in:
parent
4d1f2fdcac
commit
9fcf61b2f6
|
@ -1,5 +1,8 @@
|
|||
2021-02-10 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* Detect loops when adding when reading outlines dictionary upon
|
||||
initialization of QPDFOutlineDocumentHelper (fuzz issue 30507).
|
||||
|
||||
* Add "attachments" as an additional json key, and add some
|
||||
information about attachments to the json output.
|
||||
|
||||
|
|
BIN
fuzz/qpdf_extra/30507.fuzz
Normal file
BIN
fuzz/qpdf_extra/30507.fuzz
Normal file
Binary file not shown.
|
@ -24,8 +24,15 @@ QPDFOutlineDocumentHelper::QPDFOutlineDocumentHelper(QPDF& qpdf) :
|
|||
return;
|
||||
}
|
||||
QPDFObjectHandle cur = outlines.getKey("/First");
|
||||
std::set<QPDFObjGen> seen;
|
||||
while (! cur.isNull())
|
||||
{
|
||||
auto og = cur.getObjGen();
|
||||
if (seen.count(og))
|
||||
{
|
||||
break;
|
||||
}
|
||||
seen.insert(og);
|
||||
this->m->outlines.push_back(
|
||||
QPDFOutlineObjectHelper::Accessor::create(cur, *this, 1));
|
||||
cur = cur.getKey("/Next");
|
||||
|
|
Loading…
Reference in New Issue
Block a user