diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 13:43:11 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 13:43:11 +0000 |
commit | f46230752807801b1c506f739227bc5daf42ff8c (patch) | |
tree | c36ea378dcefe0236ac159f2c378d51c1ce229b6 /ext/zlib | |
parent | 742cc3c1dfdd7ae0d9d69a71f0a69edcd946cb7c (diff) |
merge revision(s) 16305:
* ext/zlib/zlib.c (gzreader_gets): may cause infinite loop.
a patch from Kouya <kouyataifu4 at gmail.com> in
[ruby-reference-manual:762].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17274 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 8caadaeddc..1b89553772 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -3111,6 +3111,8 @@ gzreader_gets(argc, argv, obj) if (NIL_P(rs)) { dst = gzfile_read_all(gz); if (RSTRING(dst)->len != 0) gz->lineno++; + else + return Qnil; return dst; } |