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 <[EMAIL PROTECTED]>

        * 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

Reply via email to