diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-06 15:56:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-06 15:56:21 +0000 |
commit | 86dfbd3c47ce88107922052280c0fb613eda6a54 (patch) | |
tree | 99395e285e89cebf96588ad32ef5b242b866bb9f /ext/zlib | |
parent | 4500a5207da7b626f8c568afcaaa731d1cecd4d0 (diff) | |
download | ruby-86dfbd3c47ce88107922052280c0fb613eda6a54.tar.gz |
* ext/zlib/zlib.c (gzreader_gets): may cause infinite loop.
[ruby-reference-manual:762]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/zlib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 2546daade5..47e53dceeb 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -3016,6 +3016,8 @@ gzreader_gets(int argc, VALUE *argv, VALUE obj) if (NIL_P(rs)) { dst = gzfile_read_all(gz); if (RSTRING_LEN(dst) != 0) gz->lineno++; + else + return Qnil; return dst; } |