[Kaffe] patch for problems with zip extraction

Moses DeJong dejong at cs.umn.edu
Wed Mar 10 04:52:41 PST 1999


Hello.

Here is a patch for SwitchInflater.java that fixes zip extraction
for uncompressed files. I can provide code that proves that this
fixes the problem but this is really a "no duh" fix so I am not
going to send source code in this email.



Wed Mar 10 06:48:32 CST 1999  Moses DeJong <dejong at cs.umn.edu>

	* libraries/javalib/kaffe/util/zip/SwitchInflater.java
	Fixed problem that caused uncompressed zip streams to be
	read past the zip entry size.




Index: SwitchInflater.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/kaffe/util/zip/SwitchInflater.java,v
retrieving revision 1.1
diff -u -r1.1 SwitchInflater.java
--- SwitchInflater.java 1999/02/10 21:35:03     1.1
+++ SwitchInflater.java 1999/03/10 13:58:05
@@ -56,6 +56,9 @@
 
   public synchronized int inflate(byte b[], int o, int l) throws DataFormatException {
        if (stored == true) {
+               if (l >= maxlen) {
+                       l = maxlen;
+               }
                if (l >= len) {
                        l = len;
                }



later
Mo DeJong
dejong at cs.umn.edu



More information about the kaffe mailing list