[kaffe] CVS kaffe (jim): Fix for Zip problem

Kaffe CVS cvs-commits at kaffe.org
Mon Oct 6 21:39:02 PDT 2003


PatchSet 4103 
Date: 2003/10/07 04:28:59
Author: jim
Branch: HEAD
Tag: (none) 
Log:
Fix for Zip problem

In my testing with Jakarta Gump, I found a regression when unpacking
a Zip file (when build Xerces2).  This should fix it, I hope.

Members: 
	ChangeLog:1.1698->1.1699 
	libraries/javalib/kaffe/util/zip/SwitchInflater.java:1.5->1.6 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1698 kaffe/ChangeLog:1.1699
--- kaffe/ChangeLog:1.1698	Mon Oct  6 19:23:06 2003
+++ kaffe/ChangeLog	Tue Oct  7 04:28:59 2003
@@ -1,3 +1,9 @@
+2003-10-06  Jim Pick  <jim at kaffe.org>
+
+	* libraries/javalib/kaffe/util/zip/SwitchInflater.java:
+	Classpath version of InflaterInputStream expects a zero result
+	to be returned if the buffer hasn't been filled yet.
+
 2003-10-06  Helmer Kraemer <hkraemer at kaffe.org>
 
 	* config/superh/linux/md.h:
Index: kaffe/libraries/javalib/kaffe/util/zip/SwitchInflater.java
diff -u kaffe/libraries/javalib/kaffe/util/zip/SwitchInflater.java:1.5 kaffe/libraries/javalib/kaffe/util/zip/SwitchInflater.java:1.6
--- kaffe/libraries/javalib/kaffe/util/zip/SwitchInflater.java:1.5	Thu Jul  4 01:12:02 2002
+++ kaffe/libraries/javalib/kaffe/util/zip/SwitchInflater.java	Tue Oct  7 04:29:00 2003
@@ -56,6 +56,10 @@
 
   public synchronized int inflate(byte b[], int o, int l) throws DataFormatException {
 	if (stored) {
+		/* Special case: len may be zero */
+		if (len == 0)
+		        return 0;
+
 		if (l >= maxlen) {
 			l = maxlen;
 		}




More information about the kaffe mailing list