Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE preventing CrossRefStream objects from being read #258

Closed
wants to merge 1 commit into from

Conversation

david-russo
Copy link
Member

@david-russo david-russo commented Jun 22, 2017

A NullPointerException was being thrown when trying to validate the Index entry of any CrossRefStream dictionary. For examples, see the PDFs in the regression test corpus, many of which include CrossRefStreams.

The NPEs were hidden by the method's overly general exception handling, and even though the containing method was returning false, and ending file validation, no errors of any kind were being reported. This resulted in any PDF with a CrossRefStream object being reported as "Well-formed and valid" though most of the file's contents would remain unchecked.

This bug was introduced in 1.16, and is likely to affect many modern PDF files, reporting them as valid with almost no validation. I'd suggest another hotfix release, if there's bandwidth.

A NullPointerException was being thrown when trying to validate the
Index entry of any CrossRefStream dictionary.

The NPEs were hidden by the method's general Exception handling, and even
though the containing method was returning false, and ending file
validation, no errors of any kind were being reported.

This resulted in any PDF with a CrossRefStream object being reported as
"Well-formed and valid" though most of the file's contents would remain
unchecked.
@david-russo david-russo added the bug A product defect that needs fixing label Jul 19, 2017
@david-russo david-russo deleted the xrefstream-npe branch September 11, 2017 16:30
rgfeldman added a commit to rgfeldman/jhove that referenced this pull request Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A product defect that needs fixing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants