Commit 09c1076e authored by Corey Minyard's avatar Corey Minyard Committed by Linus Torvalds

[PATCH] Re: PPP and shared zlib code in 2.5

Ok, I found it.  The problem was in the decompression code.

In inflate.c, in the routine zlib_inflate(), it reuses the passed-in "f"
parameter as a return value, but the PPP packet compression stuff needs
that return value later.
parent 455d075a
......@@ -117,12 +117,12 @@ int ZEXPORT zlib_inflate(z, f)
z_streamp z;
int f;
{
int r;
int r, trv;
uInt b;
if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL)
return Z_STREAM_ERROR;
f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;
trv = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;
r = Z_BUF_ERROR;
while (1) switch (z->state->mode)
{
......@@ -193,10 +193,10 @@ int f;
break;
}
if (r == Z_OK)
r = f;
r = trv;
if (r != Z_STREAM_END)
return r;
r = f;
r = trv;
zlib_inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);
if (z->state->nowrap)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment