1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (Init_Proc): taint preallocated exception object

sysstack_error. [ruby-talk:84534]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-10-29 06:53:48 +00:00
parent f6f8883202
commit 27ff072349
3 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed Oct 29 15:28:34 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (Init_Proc): taint preallocated exception object
sysstack_error. [ruby-talk:84534]
Wed Oct 29 11:27:39 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (ret_args): node may be NULL. [ruby-talk:84530]

1
eval.c
View file

@ -7732,6 +7732,7 @@ Init_Proc()
rb_eSysStackError = rb_define_class("SystemStackError", rb_eStandardError);
sysstack_error = rb_exc_new2(rb_eSysStackError, "stack level too deep");
OBJ_TAINT(sysstack_error);
rb_global_variable(&sysstack_error);
rb_cProc = rb_define_class("Proc", rb_cObject);

View file

@ -891,7 +891,7 @@ class CGI
# # "name2" => ["value1", "value2", ...], ... }
#
def CGI::parse(query)
params = Hash.new{|hash,key|hash[key]=[]}
params = Hash.new([].freeze)
query.split(/[&;]/n).each do |pairs|
key, value = pairs.split('=',2).collect{|v| CGI::unescape(v) }