ssh.com 3.2.0 uses zlib sync flush (start and close an empty
[u/mdw/putty] / sshzlib.c
index dc23f5c..91b29a0 100644 (file)
--- a/sshzlib.c
+++ b/sshzlib.c
@@ -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)