diff options
author | David Mitchell <davem@iabyn.com> | 2011-08-05 17:46:46 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-08-05 17:49:51 +0100 |
commit | 1380b51d3b2bb6a067c4a2a3eebbe18650487023 (patch) | |
tree | 77a135c7c65673512544b1487c9b525bc05833a1 /regexec.c | |
parent | 203979cd3f6e5fc2c4039fbd225bbbc4c1bb8f84 (diff) | |
download | perl-1380b51d3b2bb6a067c4a2a3eebbe18650487023.tar.gz |
RT #96354: \h \H \v and \V didn't check for EOL
The HORIZWS and similar regexp ops didn't check that the end of the string
had been reached; therefore they would blithely compare against the \0 at
the end of the string, or beyond.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5683,6 +5683,8 @@ NULL #define CASE_CLASS(nAmE) \ case nAmE: \ + if (locinput >= PL_regeol) \ + sayNO; \ if ((n=is_##nAmE(locinput,utf8_target))) { \ locinput += n; \ nextchr = UCHARAT(locinput); \ @@ -5690,6 +5692,8 @@ NULL sayNO; \ break; \ case N##nAmE: \ + if (locinput >= PL_regeol) \ + sayNO; \ if ((n=is_##nAmE(locinput,utf8_target))) { \ sayNO; \ } else { \ |