summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkatsu <katsu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-20 02:06:15 +0000
committerkatsu <katsu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-20 02:06:15 +0000
commit6a867d33b5aa4ed67800cd64fe19d2902250bd96 (patch)
tree73c090ade7815a79a0fdbcff80d971a190ec292d
parentfe4de8b4b8a614e6fdd04766a45b996346d9e028 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--ext/zlib/zlib.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b45e14530..e0e51536ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}
}