DescriptionBad indexing in CPDF_Document::FindPageIndex when page tree corrupt.
Moving to std::vector from the more forgiving CFX_ArrayTemplate
revealed the dubious page tree traversal, which depends on the
correctness of the /Count entries to properly summarize the total
descendants under a given node.
The only "correct" thing to do is to throw away these counts as parsed,
and re-compute them, perhaps in CountPages(). But I'm not willing to do
that since it may break unknown documents in the wild.
Pass out-params as pointers while we're at it.
BUG=680376
Review-Url: https://codereview.chromium.org/2636403003
Committed: https://pdfium.googlesource.com/pdfium/+/e507dc5004184ae3f8fd1cd19b723b4be69a46da
Patch Set 1 #Patch Set 2 : lost conditional #Patch Set 3 : return -1 for out-of-range #
Total comments: 1
Messages
Total messages: 14 (9 generated)
|