summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-26 00:48:33 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-26 00:48:33 +0000
commit7c4d1fe5e04cee519322a02d6e54801b0b118ea0 (patch)
tree417896793429b49996a0c7627df66056584bf250 /regex.c
parent12852c2e9ad0b25395d32c4ee147eb770408cf41 (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
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index e9617a6..8c79505 100644
--- a/regex.c
+++ b/regex.c
@@ -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);