From 321c94af8e43fa199c74673b37b8205b6508ee8d Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 19 Oct 2009 01:59:38 +0000 Subject: * iseq.c (prepare_iseq_build, rb_iseq_build_for_ruby2cext): untrust mark array. [ruby-core:26137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 1c4cb882be..1f00132c74 100644 --- a/iseq.c +++ b/iseq.c @@ -220,7 +220,8 @@ prepare_iseq_build(rb_iseq_t *iseq, iseq->filename = filename; iseq->line_no = line_no; iseq->defined_method_id = 0; - iseq->mark_ary = rb_ary_new(); + iseq->mark_ary = rb_ary_tmp_new(3); + OBJ_UNTRUST(iseq->mark_ary); RBASIC(iseq->mark_ary)->klass = 0; iseq->type = type; @@ -1439,6 +1440,7 @@ rb_iseq_build_for_ruby2cext( iseq->filename = rb_str_new2(filename); iseq->line_no = line_no; iseq->mark_ary = rb_ary_tmp_new(3); + OBJ_UNTRUST(iseq->mark_ary); iseq->self = iseqval; iseq->iseq = ALLOC_N(VALUE, iseq->iseq_size); -- cgit v1.2.1