summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
}