Date: Tue, 15 Mar 2005 21:51:18 +0100 From: Marc Olzheim <marcolz@stack.nl> To: Vijay.Singh@nokia.com Cc: freebsd-hackers@freebsd.org Subject: Re: memory leak in inflate.c Message-ID: <20050315205118.GD74516@stack.nl> In-Reply-To: <20050315204207.GC74516@stack.nl> References: <E40595640FD457418D8F9005C2BEC84901BE6F67@mvebe001.americas.nokia.com> <20050315204207.GC74516@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--9crTWz/Z+Zyzu20v Content-Type: multipart/mixed; boundary="uxuisgdDHaNETlh8" Content-Disposition: inline --uxuisgdDHaNETlh8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 --uxuisgdDHaNETlh8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="huft_free.patch" Content-Transfer-Encoding: quoted-printable --- 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 =3D (inflate_codes(glbl, tl, td, bl, bd)) ? 1 : 0; =20 /* free the decoding tables, return */ huft_free(glbl, tl); huft_free(glbl, td); - return 0; + + return i; } =20 /* decompress an inflated block */ --uxuisgdDHaNETlh8-- --9crTWz/Z+Zyzu20v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCN0rGezjnobFOgrERAjVlAKCOwPY3UwY/5TNMta1YEFcmPcUE7gCfalVA ArLl/ad5wmMCkz/ug2NwZFM= =J1T3 -----END PGP SIGNATURE----- --9crTWz/Z+Zyzu20v--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050315205118.GD74516>