jhove icon indicating copy to clipboard operation
jhove copied to clipboard

Issues with JPEG2000 validation

Open friesey opened this issue 9 years ago • 1 comments

Hello Folks, sample test have shown that JHOVE cannot cope with certain JPEG2000-files. If selecting the JPEG2000-module, the JHOVE GUI version will not show findings. For the JHOVE-library, the error is: java.io.EOFException in the code line: jb.process(app, module, handler, files.get(i).toString());

I have example files: The [Jplyzer testfiles] https://github.com/openpreserve/jpylyzer-test-files/blob/master/bitwiser-icc-corrupted-tagcount-1951.jp2 do not work with JHOVE:

The jpeg2000 from the [google image testsuite] https://drive.google.com/file/d/0B9lJIDXo2oPYZlNnVnRKRFdwVDg/edit do work with JHOVE.

I have not yet found the difference betweent the two of them Jplyzer can cope with them all so far. Best, Yvonne

friesey avatar May 12 '15 09:05 friesey

Haven't looked in JHOVE's source code, but my guess is that it simply takes the tagCount field in the ICC profile at face value. If that field is corrupted (as is the case for the image that causes the error), tagCount can assume some ridiculously large value, which can lead to all sorts of trouble.

This used to be a problem in older versions of jpylyzer as well, which I fixed there by imposing an (arbitrary) upper limit on tagCount. More details here:

https://github.com/openpreserve/jpylyzer/issues/31

So I suppose something similar could be done in JHOVE.

bitsgalore avatar Aug 17 '15 13:08 bitsgalore