diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-29 08:17:48 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-29 08:17:48 +0000 |
commit | 0d077554723c88f06dd351d29edd2246693e0a42 (patch) | |
tree | adbd40c0c5715c59ec92a661eed4a4df6eaa4acf | |
parent | 6108fcdc53fb5b44cc397cf622e9f07cb1cc82ca (diff) |
* marshal.c (r_leave): move proc invocation from r_entry() to
avoid potential crash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | marshal.c | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Sat Sep 29 17:14:44 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * marshal.c (r_leave): move proc invocation from r_entry() to + avoid potential crash. + Sat Sep 29 12:28:08 2007 Tanaka Akira <akr@fsij.org> * bootstraptest/runner.rb (assert_normal_exit): new method. @@ -1016,9 +1016,6 @@ r_entry(VALUE v, struct load_arg *arg) if ((VALUE)real_obj != Qundef) OBJ_TAINT((VALUE)real_obj); } - if (arg->proc) { - v = rb_funcall(arg->proc, rb_intern("call"), 1, v); - } return v; } @@ -1035,7 +1032,10 @@ r_leave(VALUE v, struct load_arg *arg) compat->loader(real_obj, v); } st_delete(arg->compat_tbl, &key, 0); - return real_obj; + v = real_obj; + } + if (arg->proc) { + v = rb_funcall(arg->proc, rb_intern("call"), 1, v); } return v; } |