Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
1.23.0
-
None
-
None
Description
Over on Tika, this file is being detected as a tar file. It is an os/2 bitmap array file.
We're using ArchiveStreamFactory.detect(), which finds no magic so it gets down to:
tais = new TarArchiveInputStream(new ByteArrayInputStream(tarHeader)); if (tais.getNextTarEntry().isCheckSumOK())
The next tar entry has length 0 and the checksum of 0 works.
If you're up for it, it might make sense to check that the next tar entry has a length > 0.
I realize that this is a trivial/rare problem with a rare or specially crafted file. And, I realize that this only fixes one special case. I'm not sure it makes sense to add complexity to your logic.
Attachments
Attachments
Issue Links
- links to