aboutsummaryrefslogtreecommitdiff
path: root/tools/plink/sshzlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/plink/sshzlib.c')
-rw-r--r--tools/plink/sshzlib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/plink/sshzlib.c b/tools/plink/sshzlib.c
index 7d37141c7..9c780a41f 100644
--- a/tools/plink/sshzlib.c
+++ b/tools/plink/sshzlib.c
@@ -1259,6 +1259,8 @@ int zlib_decompress_block(void *handle, unsigned char *block, int len,
goto finished;
nlen = dctx->bits & 0xFFFF;
EATBITS(16);
+ if (dctx->uncomplen != (nlen ^ 0xFFFF))
+ goto decode_error;
if (dctx->uncomplen == 0)
dctx->state = OUTSIDEBLK; /* block is empty */
else
@@ -1369,6 +1371,7 @@ int main(int argc, char **argv)
const struct ssh_compress ssh_zlib = {
"zlib",
+ "zlib@openssh.com", /* delayed version */
zlib_compress_init,
zlib_compress_cleanup,
zlib_compress_block,