summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-13 04:38:19 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-13 04:38:19 +0000
commit332ddc25e33054764b72da8fd0b572ab1c6c6e65 (patch)
tree11df6fb10d4e8bca0069f7509632e09304816644 /regexec.c
parentc4fbe2471f42249bd57e1c071c99349d2331aea5 (diff)
downloadperl-332ddc25e33054764b72da8fd0b572ab1c6c6e65.tar.gz
It could be possible for the case-insensitive
Unicode-aware string comparison to wander off to the la-la land. p4raw-id: //depot/perl@13669
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index 0d97be3222..4b073d2da4 100644
--- a/regexec.c
+++ b/regexec.c
@@ -971,7 +971,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
while (s <= e) {
if ( utf8_to_uvchr((U8*)s, &len) == c1
&& (ln == 1 ||
- ibcmp_utf8(s, do_utf8, m, UTF, ln)) )
+ ibcmp_utf8(s, do_utf8, strend - s,
+ m, UTF, ln)) )
goto got_it;
s += len;
}
@@ -980,7 +981,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
UV c = utf8_to_uvchr((U8*)s, &len);
if ( (c == c1 || c == c2)
&& (ln == 1 ||
- ibcmp_utf8(s, do_utf8, m, UTF, ln)) )
+ ibcmp_utf8(s, do_utf8, strend - s,
+ m, UTF, ln)) )
goto got_it;
s += len;
}