You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have several files that trigger the following NullPointerException:
java.lang.NullPointerException: Cannot invoke "edu.harvard.hul.ois.jhove.module.pdf.Token.isSimpleToken()" because "tok" is null
at edu.harvard.hul.ois.jhove.module.pdf.Parser.readObject(Parser.java:287)
at edu.harvard.hul.ois.jhove.module.pdf.Parser.readArray(Parser.java:304)
at edu.harvard.hul.ois.jhove.module.pdf.Parser.readObject(Parser.java:275)
at edu.harvard.hul.ois.jhove.module.pdf.Parser.readDictionary(Parser.java:340)
at edu.harvard.hul.ois.jhove.module.PdfModule.parseTrailer(PdfModule.java:1322)
at edu.harvard.hul.ois.jhove.module.PdfModule.parse(PdfModule.java:820)
at edu.harvard.hul.ois.jhove.JhoveBase.processFile(JhoveBase.java:782)
at edu.harvard.hul.ois.jhove.JhoveBase.process(JhoveBase.java:567)
at edu.harvard.hul.ois.jhove.JhoveBase.dispatch(JhoveBase.java:439)
at Jhove.main(Jhove.java:295)
I cannot share the offending files, but jhove_npe.zip is a synthetic example I made that also triggers the NPE. It seems to be related to escaped characters in the file's trailer dictionary's /ID entry: \376\377\377\377 causes NPE, while \377\377\377\377 reports "Valid and well-formed". Various combinations around \3xx work or don't work; I was unable to investigate this further.
The text was updated successfully, but these errors were encountered:
The original example only works against JHove 1.20.0 with some old version of PDF-hul. Sorry, my fault for not testing against latest...
Anyway, here jhove_npe_1224.zip is an updated version that also causes NPE on JHOVE 1.28.0 and PDF-hul 1.12.4. The ID is from the original file: Not sure why it was written like that (hex string would have been shorter), but it seems to be valid according to the PDF standard.
We have several files that trigger the following NullPointerException:
I cannot share the offending files, but jhove_npe.zip is a synthetic example I made that also triggers the NPE. It seems to be related to escaped characters in the file's trailer dictionary's
/ID
entry:\376\377\377\377
causes NPE, while\377\377\377\377
reports "Valid and well-formed". Various combinations around\3xx
work or don't work; I was unable to investigate this further.The text was updated successfully, but these errors were encountered: