diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-01 03:35:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-01 03:35:01 +0000 |
commit | ffce6cc29631cbe46068af7601780981e4969f2a (patch) | |
tree | 22070032294df853b24e3fa8835468d85a183fab /regexec.c | |
parent | 99f22665d16e539ac96fd8697c65cfa96010d82d (diff) | |
download | perl-ffce6cc29631cbe46068af7601780981e4969f2a.tar.gz |
Unnecessary/Lingering UTF8 flag might mess up caseless matching
(found by Jeffrey Friedl)
p4raw-id: //depot/perl@13992
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -995,7 +995,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta c = utf8_to_uvchr((U8*)s, &len); if ( c == c1 && (ln == len || - !ibcmp_utf8(s, do_utf8, strend - s, + !ibcmp_utf8(s, do_utf8, + strend - s > ln ? ln : strend - s, m, UTF, ln)) && (norun || regtry(prog, s)) ) goto got_it; @@ -1007,7 +1008,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta && (f == c1 || f == c2) && (ln == foldlen || !ibcmp_utf8((char *)foldbuf, - do_utf8, foldlen, + do_utf8, + foldlen > ln ? ln : foldlen, m, UTF, ln)) && (norun || regtry(prog, s)) ) goto got_it; @@ -1032,7 +1034,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta if ( (c == c1 || c == c2) && (ln == len || - !ibcmp_utf8(s, do_utf8, strend - s, + !ibcmp_utf8(s, do_utf8, + strend - s > ln ? ln : strend - s, m, UTF, ln)) && (norun || regtry(prog, s)) ) goto got_it; @@ -1044,7 +1047,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta && (f == c1 || f == c2) && (ln == foldlen || !ibcmp_utf8((char *)foldbuf, - do_utf8, foldlen, + do_utf8, + foldlen > ln ? ln : foldlen, m, UTF, ln)) && (norun || regtry(prog, s)) ) goto got_it; |