Commit 80169b1f authored by Yuval Brik's avatar Yuval Brik Committed by Rod Vagg
Browse files

zlib: decompression throw on truncated input

Check for unexpected end-of-file error when decompressing. If the output
buffer still has space after decompressing and deflate returned Z_OK or
Z_BUF_ERROR - that means unexpected end-of-file. Added
test-zlib-truncated.js for the case of truncated input. Fixed the zlib
dictionary test to not end the inflate stream on a truncated output (no
crc) of deflate

Fixes: https://github.com/nodejs/node/issues/2043
PR-URL: https://github.com/nodejs/node/pull/2595


Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
parent 412252ca
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment