victims / victims-lib-java

The victims library containing the hashing logic for java specific artifacts.
GNU Affero General Public License v3.0
5 stars 8 forks source link

NPE when handling corrupt jar files #38

Open abn opened 10 years ago

abn commented 10 years ago

While handling a corrupt jar file, the following stack trace was dumped:

Caused by: java.util.zip.ZipException: invalid distance too far back
         at 
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
         at java.util.zip.ZipInputStream.read(ZipInputStream.java:193)
         at java.util.jar.JarInputStream.read(JarInputStream.java:207)
         at 
com.redhat.victims.fingerprint.JarFile.getNextFile(JarFile.java:214)
         at com.redhat.victims.fingerprint.JarFile.<init>(JarFile.java:149)

The victims lib should be more robust and provide better error/debug information in the scenarios.