Skip to content

Commit

Permalink
Merge pull request #891 from openpreserve/samalloing-patch-3
Browse files Browse the repository at this point in the history
making the parsing of broken PDFs more robust
  • Loading branch information
carlwilson authored Mar 4, 2024
2 parents 58f3565 + 05f7c0f commit 75bc971
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,10 @@ protected boolean readXRefTables(RepInfo info) throws IOException {
// (Most likely we've hit the keyword "trailer".
break;
}
_objCount = ((Numeric) _parser.getNext()).getIntegerValue();
token = _parser.getNext();
if (token instanceof Numeric) {
_objCount = ((Numeric) token).getIntegerValue();
}
if (_xref == null) {
_xref = new long[_objCount];
}
Expand Down

0 comments on commit 75bc971

Please sign in to comment.