classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ZipFile bug


From: Archie Cobbs
Subject: ZipFile bug
Date: Tue, 9 Dec 2003 13:20:58 -0600 (CST)

Hi,

The web site still seems to be down, so here is a bug report FWIW...

    public class xx {
        public static void main(String[] args) throws Exception {
            ZipFile f = new ZipFile("/dev/null");
        }
    }

This program generates a ZipException on JDK, but Classpath
does not try to verify the file at all so doesn't throw any
exception... even if you then try to read the file's entries.

Instead what happens is you get null back from ZipFile.entries()
which is not according to spec. The ZipFile constructor should try
to do some minimal verification of the files's signature, etc.

I think a simple fix would be to try to read the directory
(which you are most likely going to have to do later anyway)
in the constructor(s).

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs     *    Halloo Communications    *     http://www.halloo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]