diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-26 00:48:33 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-26 00:48:33 +0000 |
commit | 7c4d1fe5e04cee519322a02d6e54801b0b118ea0 (patch) | |
tree | 417896793429b49996a0c7627df66056584bf250 | |
parent | 12852c2e9ad0b25395d32c4ee147eb770408cf41 (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval.c | 5 | ||||
-rw-r--r-- | regex.c | 2 | ||||
-rw-r--r-- | variable.c | 3 |
4 files changed, 5 insertions, 9 deletions
@@ -14,6 +14,10 @@ Wed Sep 25 17:46:46 2002 NAKAMURA Usaku <[email protected]> * lib/mkmf.rb (libpathflag): restore ENV['LIB'] when some error occured. +Wed Sep 25 16:14:51 2002 Yukihiro Matsumoto <[email protected]> + + * regex.c (re_match): p1 may exceed pend limit. + Mon Sep 23 23:22:43 2002 Nobuyoshi Nakada <[email protected]> * eval.c (rb_call0): must not clear ruby_current_node, or @@ -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) { @@ -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); diff --git a/variable.c b/variable.c index 255854d8f0..4d3944d60b 100644 --- a/variable.c +++ b/variable.c @@ -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 && |