Repository navigation
Commit 2c9b12d
Ignore data after the end of the stream in the capped inflate
With decompressed_max_bytes in effect, a value whose compressed form had
bytes after the end of its zlib or gzip stream (a second stream or member,
or trailing junk) came back with those bytes appended, because
Zlib::Inflate#finish returns them. The uncapped path, like the code before
the cap, ignores them. The capped path now stops at the end of the stream.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>1 parent 1cf990d commit 2c9b12d
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
| |||
0 commit comments