diff options
author | Tony Cook <tony@develop-help.com> | 2013-06-01 11:10:39 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2013-06-03 22:05:27 +1000 |
commit | 9597860a6bc546628ff50b88916291944416e77f (patch) | |
tree | ae8e55a1b24ec526a4235791da6272814bd25419 /regexec.c | |
parent | 0430522fe9e09f2129cdb8268ddd1ca1a36e6a5f (diff) | |
download | perl-9597860a6bc546628ff50b88916291944416e77f.tar.gz |
[perl #118175] prevent a similar overflow for CANY
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6705,7 +6705,7 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, scan = loceol; break; case CANY: /* Move <scan> forward <max> bytes, unless goes off end */ - if (utf8_target && scan + max < loceol) { + if (utf8_target && loceol - scan > max) { /* <loceol> hadn't been adjusted in the UTF-8 case */ scan += max; |