On Tue, Mar 15, 2005 at 09:42:07PM +0100, Marc Olzheim wrote:
> > Thanks. Could someone generate the patch as I dont have the latest
> > FreeBSD source checked out.
> 
> Hmm, there seem to be more possible leaks, as the code has been
> literally copied from /usr/src/gnu/usr.bin/gzip/, including the define
> of PKZIP_BUG_WORKAROUND. Have you checked all possible problems, or did
> you just stumble onto this one ?

Ah, never mind, that PKZIP_BUG_WORKAROUND part seems to be ok.

Here it is.

Marc
--- kern/inflate.c      Tue Mar 15 21:46:14 2005
+++ kern/inflate.c      Tue Mar 15 21:46:22 2005
@@ -956,14 +956,15 @@
                return i;       /* incomplete code set */
 #endif
        }
+
        /* decompress until an end-of-block code */
-       if (inflate_codes(glbl, tl, td, bl, bd))
-               return 1;
+       i = (inflate_codes(glbl, tl, td, bl, bd)) ? 1 : 0;
 
        /* free the decoding tables, return */
        huft_free(glbl, tl);
        huft_free(glbl, td);
-       return 0;
+
+       return i;
 }
 
 /* decompress an inflated block */

Attachment: pgpehXhX6L819.pgp
Description: PGP signature

Reply via email to