diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/zlib/zlib.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sun Jul 20 11:03:25 2003 UENO Katsuhiro <katsu@blue.sky.or.jp> + + * ext/zlib/zlib.c (gzfile_read_header): gz->z.input may be nil after + finishing reading a gzip header. + Sat Jul 19 22:25:47 2003 Yukihiro Matsumoto <matz@ruby-lang.org> * string.c (rb_str_match2): add warning to "~string". diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 24f226843f..e1aebe446f 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -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); } } |