diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-01 08:15:28 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-01 08:15:28 +0000 |
commit | ab59aa3fb32a9be7325124f5d1c673ce04d7f873 (patch) | |
tree | 612d3c4da1d514b66a4d5dce57bd4f60c7fad3d3 | |
parent | a50744a88455ae1a828c3951bd344c97ce590ff7 (diff) |
* regex.c (re_match): p1 may exceed pend limit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/tcltklib/tcltklib.c | 4 | ||||
-rw-r--r-- | lib/uri/mailto.rb | 8 | ||||
-rw-r--r-- | regex.c | 2 | ||||
-rw-r--r-- | version.h | 8 |
5 files changed, 15 insertions, 11 deletions
@@ -1,3 +1,7 @@ +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 02:46:29 2002 Yukihiro Matsumoto <matz@ruby-lang.org> * eval.c (ruby_run): should set toplevel visibility again here. diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index 0972f9ec9d..d48d4bec02 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -729,8 +729,8 @@ invoke_queue_handler(evPtr, flags) /* check safe-level */ if (rb_safe_level() != q->safe_level) { - *(q->result) = rb_funcall(rb_proc_new(ivq_safelevel_handler, - Data_Wrap_Struct(rb_cData,0,0,q)), + *(q->result) = rb_funcall(rb_iterate(rb_f_lambda, 0, ivq_safelevel_handler, + Data_Wrap_Struct(rb_cData,0,0,q)), rb_intern("call"), 0); } else { *(q->result) = ip_invoke_real(q->argc, q->argv, q->obj); diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index 0a378b5c51..f7a95270f8 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -46,12 +46,12 @@ module URI # hname = *urlc # hvalue = *urlc # header = hname "=" hvalue - header_pattern = "(?:[^?=&]*=[^?=&]*)" + HEADER_PATTERN = "(?:[^?=&]*=[^?=&]*)" HEADER_REGEXP = /#{header_pattern}/ # headers = "?" header *( "&" header ) # to = #mailbox # mailtoURL = "mailto:" [ to ] [ headers ] - mailbox_pattern = "(?:[^(),%?=&]|#{PATTERN::ESCAPED})" + MAILBOX_PATTERN = "(?:[^(),%?=&]|#{PATTERN::ESCAPED})" MAILBOX_REGEXP = /#{mailbox_pattern}/ MAILTO_REGEXP = Regexp.new(" \\A @@ -155,7 +155,7 @@ module URI return true unless v return true if v.size == 0 - if OPAQUE !~ v || /\A#{MAILBOX_REGEXP}*\z/o !~ v + if OPAQUE !~ v || /\A#{MAILBOX_PATTERN}*\z/o !~ v raise InvalidComponentError, "bad component(expected opaque component): #{v}" end @@ -191,7 +191,7 @@ module URI return true if v.size == 0 if OPAQUE !~ v || - /\A(#{HEADER_REGEXP}(?:\&#{HEADER_REGEXP})*)\z/o !~ v + /\A(#{HEADER_PATTERN}(?:\&#{HEADER_PATTERN})*)\z/o !~ v raise InvalidComponentError, "bad component(expected opaque component): #{v}" end @@ -4036,7 +4036,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); @@ -1,4 +1,4 @@ -#define RUBY_VERSION "1.6.7" -#define RUBY_RELEASE_DATE "2002-09-25" -#define RUBY_VERSION_CODE 167 -#define RUBY_RELEASE_CODE 20020925 +#define RUBY_VERSION "1.6.8" +#define RUBY_RELEASE_DATE "2002-10-01" +#define RUBY_VERSION_CODE 168 +#define RUBY_RELEASE_CODE 20021001 |