diff options
author | Tony Cook <tony@develop-help.com> | 2013-05-28 20:43:28 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2013-06-03 22:05:27 +1000 |
commit | e93698247608fc5e325f579722e45f4278eccc3c (patch) | |
tree | 1d2deae5d57a605fc40aba56ec81a9eb8529b24b /regexec.c | |
parent | aad042978d66db81c18ecc36f46bd4b27dd980e0 (diff) | |
download | perl-e93698247608fc5e325f579722e45f4278eccc3c.tar.gz |
[perl #118175] avoid overflowing a pointer for repeated EXACT nodes
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6724,7 +6724,7 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, * can use UTF8_IS_INVARIANT() even if the pattern isn't UTF-8, as it's * true iff it doesn't matter if the argument is in UTF-8 or not */ if (UTF8_IS_INVARIANT(c) || (! utf8_target && ! reginfo->is_utf8_pat)) { - if (utf8_target && scan + max < loceol) { + if (utf8_target && loceol - scan > max) { /* We didn't adjust <loceol> because is UTF-8, but ok to do so, * since here, to match at all, 1 char == 1 byte */ loceol = scan + max; |