X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/2d466ffd08675d26db45e524c2fe6a8cf4628e2b..01f7687fdca37de33d86939d2ed0fcf5dfd695d0:/sshzlib.c diff --git a/sshzlib.c b/sshzlib.c index cf471dbd..91b29a0e 100644 --- a/sshzlib.c +++ b/sshzlib.c @@ -40,13 +40,13 @@ #include #include -/* FIXME */ -#include -#include -#include "putty.h" - #include "ssh.h" +#ifndef FALSE +#define FALSE 0 +#define TRUE (!FALSE) +#endif + /* ---------------------------------------------------------------------- * Basic LZ77 code. This bit is designed modularly, so it could be * ripped out and used in a different LZ77 compressor. Go to it, @@ -1164,7 +1164,10 @@ int zlib_decompress_block(unsigned char *block, int len, goto finished; nlen = dctx.bits & 0xFFFF; EATBITS(16); - dctx.state = UNCOMP_DATA; + if (dctx.uncomplen == 0) + dctx.state = OUTSIDEBLK; /* block is empty */ + else + dctx.state = UNCOMP_DATA; break; case UNCOMP_DATA: if (dctx.nbits < 8)