Skip to content

Commit

Permalink
* marshal.c (r_leave): move proc invocation from r_entry() to
Browse files Browse the repository at this point in the history
  avoid potential crash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Sep 29, 2007
1 parent 6108fcd commit 0d07755
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}
Expand Down

0 comments on commit 0d07755

Please sign in to comment.