BUG in ZipInputStream

Mo DeJong mdejong at cygnus.com
Thu Jan 27 17:19:10 PST 2000


This bug has been around in one form or another for many many months.
The problem seems to be related to the header written before the actual
data is placed in the zip file. I have been meaning to get around
to fixing it but I just have not had the time to write up all the test
cases needed to fix it once and for all. If you want to jump in and
take a whack at it, the problem is in the class ZipOutputStream.java!

Mo Dejong
Red Hat Inc.

On Fri, 28 Jan 2000, Hiroshi Oota wrote:

> 
> ;; > I built Kaffe from CVS tree today under FreeBSD-3.4-RELEASE.
> ;; 
> ;; > The ChangeLog says
> ;; 
> ;; >        Tue Dec 28 10:14:16 CET 1999  Edouard G. Parmelan  <egp at free.fr>
> ;; 
> ;; Do you mean this is the latest entry in the ChangeLog?  It's more than
> ;; a month old, and there have been dozens of changes after that.
> No, I picked up related entry from ChangeLog.
> I think the ZipInputStream still has a bug.
> try, `jar tvf /usr/local/share/kaffe/kjc.jar'. It will shows
> 
> 1:     0 Mon Dec 13 14:11:46 GMT+9:00 1999 META-INF/MANIFEST.MF
> 2:     0 Mon Dec 13 13:32:24 GMT+9:00 1999 at/dms/util/
> 3:     0 Mon Dec 13 13:32:24 GMT+9:00 1999 at/dms/util/ArrayLocator.class
> 4:     0 Mon Dec 13 13:32:24 GMT+9:00 1999 at/dms/util/Utils.class
> 5:java.io.IOException: LOC header signature bad: 50000007
> 6:	at java.lang.Throwable.<init>(Throwable.java:38)
> 7:	at java.lang.Exception.<init>(Exception.java:24)
> 8:	at java.io.IOException.<init>(IOException.java:25)
> 9:	at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:55)
> 10:	at kaffe.tools.jar.Jar.listFilesInJar(Jar.java:601)
> 11:	at kaffe.tools.jar.Jar.processJar(Jar.java:402)
> 12:	at kaffe.tools.jar.Jar.start(Jar.java:60)
> 13:	at kaffe.tools.jar.Jar.main(Jar.java:39)
> 
> the lines 1-4 says that the kaffe environment which I use is
> includes the following changes.
> 
> Sun Jan  9 02:50:29 CET 2000  Edouard G. Parmelan  <egp at free.fr>
>     <snip>
> 	* libraries/javalib/java/util/zip/ZipEntry.java: add new package method
> 	setDosTime().
> 	* libraries/javalib/java/util/zip/ZipInputStream.java (getNextEntry):
> 	Use setDosTime() to set time entry.
> --
> 
> 				HIROSHI OOTA
> 				oota at LSi.nec.co.jp
> 



More information about the kaffe mailing list