Skip to content

zlib: fix decompression of empty data streams

Rodrigo Muino Tomonari requested to merge github/fork/addaleax/zlib-empty into master

add4b0ab made the assumption that compressed data would never lead to an empty decompressed stream.

Fix that by explicitly checking the number of read bytes.

Fixes: https://github.com/nodejs/node/issues/17041 Refs: https://github.com/nodejs/node/pull/13322

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

zlib

Merge request reports

Loading