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.
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)
{
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)
{