mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Add some extra validation to zlib decompression (primarily to shut up a GCC 4.6
warning). [originally from svn r9113]
This commit is contained in:
parent
d5790e1e72
commit
767778cf1b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user