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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/plink/sshzlib.c b/tools/plink/sshzlib.c
index 8a64e3563..c69edfb81 100644
--- a/tools/plink/sshzlib.c
+++ b/tools/plink/sshzlib.c
@@ -1234,6 +1234,8 @@ int zlib_decompress_block(void *handle, unsigned char *block, int len,
goto finished;
if (code == -2)
goto decode_error;
+ if (code >= 30) /* dist symbols 30 and 31 are invalid */
+ goto decode_error;
dctx->state = GOTDISTSYM;
dctx->sym = code;
break;