Repository navigation
Commit b4434b8
Keep the inflated member alive in GzipReader.zcat
Zlib::GzipReader.zcat copied each inflated member into the result with rb_str_cat, but nothing referenced the member string after its pointer and length were read, so a GC triggered while growing the result could free it in the middle of the copy. With members of tens of MB this crashed in memcpy, or returned data of the right length that was all NUL bytes or otherwise corrupted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent ca6e1fa commit b4434b8
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4085 | 4085 | | |
4086 | 4086 | | |
4087 | 4087 | | |
| 4088 | + | |
4088 | 4089 | | |
4089 | 4090 | | |
4090 | 4091 | | |
| |||
0 commit comments