mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/zlib/zlib.c (gzfile_read_header): gz->z.input may be nil after finishing reading a gzip header.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fe4de8b4b8
commit
6a867d33b5
2 changed files with 6 additions and 1 deletions
|
@ -1697,7 +1697,7 @@ gzfile_read_header(gz)
|
|||
zstream_discard_input(&gz->z, len + 1);
|
||||
}
|
||||
|
||||
if (RSTRING(gz->z.input)->len > 0) {
|
||||
if (gz->z.input != Qnil && RSTRING(gz->z.input)->len > 0) {
|
||||
zstream_run(&gz->z, 0, 0, Z_SYNC_FLUSH);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue