mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-08 14:21:06 +00:00
Throw an exception if the root of the pages tree misses the /Kids array
This commit is contained in:
parent
7f2d76b78d
commit
25e11a444a
@ -66,10 +66,12 @@ QPDF::getAllPages()
|
||||
getRoot().replaceKey("/Pages", pages);
|
||||
}
|
||||
seen.clear();
|
||||
if (pages.hasKey("/Kids")) {
|
||||
if (!pages.hasKey("/Kids")) {
|
||||
// Ensure we actually found a /Pages object.
|
||||
getAllPagesInternal(pages, visited, seen, false);
|
||||
throw QPDFExc(
|
||||
qpdf_e_pages, m->file->getName(), "", 0, "root of pages tree has no /Kids array");
|
||||
}
|
||||
getAllPagesInternal(pages, visited, seen, false);
|
||||
if (m->invalid_page_found) {
|
||||
flattenPagesTree();
|
||||
m->invalid_page_found = false;
|
||||
|
Loading…
Reference in New Issue
Block a user