diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-27 02:46:54 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-27 02:46:54 +0000 |
| commit | b154c9488ec0e660ac4ebe7e14bede39f064d731 (patch) | |
| tree | 69f926f26570f7cbe08fe38dca0c011e8051e945 /lib/cgi.rb | |
| parent | b0d8b59e5a2d29124140140b21654eec8c141327 (diff) | |
| download | ruby-b154c9488ec0e660ac4ebe7e14bede39f064d731.tar.gz ruby-b154c9488ec0e660ac4ebe7e14bede39f064d731.tar.xz ruby-b154c9488ec0e660ac4ebe7e14bede39f064d731.zip | |
* string.c (RESIZE_CAPA): check string attribute before modifying
capacity member of string structure. [ruby-dev:24594]
* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
performance. [ruby-talk:117701]
* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
arguments, unless (digit)$ style used.
* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
performance. [ruby-talk:117701]
* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
arguments, unless (digit)$ style used.
* eval.c (frame_free): Guy Decoux solved the leak problem.
Thanks. [ruby-core:03549]
* ext/zlib/zlib.c (zstream_append_input): clear klass for z->input
to avoid potential vulnerability.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi.rb')
| -rw-r--r-- | lib/cgi.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb index 9e50fb494..fc0913349 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -1012,10 +1012,13 @@ class CGI end c = if bufsize < content_length - stdinput.read(bufsize) or '' + stdinput.read(bufsize) else - stdinput.read(content_length) or '' + stdinput.read(content_length) end + if c.nil? + raise EOFError, "bad content body" + end buf.concat(c) content_length -= c.size end |
