Skip to content

Commit

Permalink
Fix the xpdf fuzzer (google#11716)
Browse files Browse the repository at this point in the history
The number of pages is starting at `1`, and not at `0`

This should fix google#11711
  • Loading branch information
jvoisin authored Mar 21, 2024
1 parent cf33d03 commit 5d1bf13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/xpdf/fuzz_pdfload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
xfa.free();
}

for (size_t i = 0; i < doc.getNumPages(); i++) {
for (size_t i = 1; i <= doc.getNumPages(); i++) {
doc.getLinks(i);
auto page = doc.getCatalog()->getPage(i);
if (!page->isOk()) {
Expand Down

0 comments on commit 5d1bf13

Please # to comment.