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

* regex.c (re_match): p1 may exceed pend limit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2002-09-26 00:48:33 +00:00
parent 12852c2e9a
commit 7c4d1fe5e0
4 changed files with 5 additions and 9 deletions

View file

@ -14,6 +14,10 @@ Wed Sep 25 17:46:46 2002 NAKAMURA Usaku <usa@ruby-lang.org>
* lib/mkmf.rb (libpathflag): restore ENV['LIB'] when some error occured.
Wed Sep 25 16:14:51 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
* regex.c (re_match): p1 may exceed pend limit.
Mon Sep 23 23:22:43 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (rb_call0): must not clear ruby_current_node, or

5
eval.c
View file

@ -3161,11 +3161,6 @@ rb_eval(self, n)
if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0) {
rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
}
if (node->nd_noex) { /* toplevel */
/* should upgrade to rb_warn() if no super was called inside? */
rb_warning("overriding global function `%s'",
rb_id2name(node->nd_mid));
}
}
if (node->nd_noex == NOEX_PUBLIC) {

View file

@ -4017,7 +4017,7 @@ re_match(bufp, string_arg, size, pos, regs)
else
break;
}
if ((enum regexpcode)*p1 == jump)
if (p1 < pend && (enum regexpcode)*p1 == jump)
p[-1] = unused;
else
PUSH_FAILURE_POINT(0, 0);

View file

@ -143,9 +143,6 @@ classname(klass)
VALUE path = Qnil;
ID classpath = rb_intern("__classpath__");
if (TYPE(klass) == T_ICLASS) {
klass = RBASIC(klass)->klass;
}
klass = rb_class_real(klass);
if (!klass) klass = rb_cObject;
if (ROBJECT(klass)->iv_tbl &&