Commit fa01fe6
zlib: fix decompression of empty data streams
add4b0a made the assumption that compressed data
would never lead to an empty decompressed stream.
Fix that by explicitly checking the number of read bytes.
PR-URL: #17042
Fixes: #17041
Refs: #13322
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 035a24e commit fa01fe6Copy full SHA for fa01fe6
File tree
Expand file treeCollapse file tree
2 files changed
+31
-0
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+31
-0
lines changedOpen diff view settings
Collapse file
+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
| 98 | + |
| 99 | + |
98 | 100 | |
99 | 101 | |
100 | 102 | |
| ||
485 | 487 | |
486 | 488 | |
487 | 489 | |
| 490 | + |
| 491 | + |
| 492 | + |
488 | 493 | |
489 | 494 | |
490 | 495 | |
|
Collapse file
test/parallel/test-zlib-empty-buffer.js
Copy file name to clipboard+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
0 commit comments