mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-19 00:29:07 +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);
|
getRoot().replaceKey("/Pages", pages);
|
||||||
}
|
}
|
||||||
seen.clear();
|
seen.clear();
|
||||||
if (pages.hasKey("/Kids")) {
|
if (!pages.hasKey("/Kids")) {
|
||||||
// Ensure we actually found a /Pages object.
|
// 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) {
|
if (m->invalid_page_found) {
|
||||||
flattenPagesTree();
|
flattenPagesTree();
|
||||||
m->invalid_page_found = false;
|
m->invalid_page_found = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user