summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-24 06:21:14 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-24 06:21:14 +0000
commitaad6dd50c129d4a28bd6a2f800c277e851c3348a (patch)
tree505d81079bd45792d42ab232437b4d6b63482654
parent30793b7ca6cccaaac5d87a0f4c4cc152db841ff9 (diff)
downloadruby-aad6dd50c129d4a28bd6a2f800c277e851c3348a.tar.gz
ruby-aad6dd50c129d4a28bd6a2f800c277e851c3348a.tar.xz
ruby-aad6dd50c129d4a28bd6a2f800c277e851c3348a.zip
* regexec.c (match_at): follow enclen's change.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--regexec.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e63c49cd..024fdbf81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec 24 15:20:03 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * regexec.c (match_at): follow enclen's change.
+
Thu Dec 24 12:08:00 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/delegate.rb (marshal_dump/load): dump & load instance variables
diff --git a/regexec.c b/regexec.c
index 9fb5ff5da..b2f9c9fd2 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1878,7 +1878,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
if (scv) goto fail;
STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem);
- n = enclen(encode, s);
+ n = enclen(encode, s, end);
DATA_ENSURE(n);
if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
sprev = s;
@@ -1896,7 +1896,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
if (scv) goto fail;
STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem);
- n = enclen(encode, s);
+ n = enclen(encode, s, end);
if (n > 1) {
DATA_ENSURE(n);
sprev = s;