From: Lucio Maciel <abslucio@terra.com.br>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] zlib double-free fix
Date: Tue, 12 Mar 2002 10:52:15 -0300 [thread overview]
Message-ID: <20020312105215.0f2c1294.abslucio@terra.com.br> (raw)
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
Forgot to attach the diff... sorry...
so here it goes..
Here is a small patch to fix the double-free in drivers/net/zlib.c
its against 2.4.19-pre3 but works fine in others versions
--
::: Lucio Maciel
::: abslucio@terra.com.br
::: Absoluta.Net :::
[-- Attachment #2: zlib.diff --]
[-- Type: application/octet-stream, Size: 1119 bytes --]
--- drivers/net/zlib.c.orig Tue Mar 12 10:15:16 2002
+++ drivers/net/zlib.c Tue Mar 12 10:29:28 2002
@@ -3860,10 +3860,12 @@
&s->sub.trees.tb, z);
if (t != Z_OK)
{
- ZFREE(z, s->sub.trees.blens);
r = t;
if (r == Z_DATA_ERROR)
+ {
s->mode = BADB;
+ ZFREE(z, s->sub.trees.blens);
+ }
LEAVE
}
s->sub.trees.index = 0;
@@ -3928,14 +3930,17 @@
#endif
t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
s->sub.trees.blens, &bl, &bd, &tl, &td, z);
- ZFREE(z, s->sub.trees.blens);
if (t != Z_OK)
{
if (t == (uInt)Z_DATA_ERROR)
+ {
s->mode = BADB;
+ ZFREE(z, s->sub.trees.blens);
+ }
r = t;
LEAVE
}
+ ZFREE(z, s->sub.trees.blens);
Tracev((stderr, "inflate: trees ok, %d * %d bytes used\n",
inflate_hufts, sizeof(inflate_huft)));
if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
next reply other threads:[~2002-03-12 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-12 13:52 Lucio Maciel [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-03-12 13:36 Lucio Maciel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020312105215.0f2c1294.abslucio@terra.com.br \
--to=abslucio@terra.com.br \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®