diff options
author | hv@crypt.org <hv@crypt.org> | 2009-07-06 15:45:12 +0100 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2009-07-06 21:37:35 +0200 |
commit | 84d2fa142c064fe21af5121174d51b764b9d9c69 (patch) | |
tree | ef7d97f5aff8368f6454e3bc56d7858bb57e8c65 /regexec.c | |
parent | b074547015307bfbdc79cc38e4fa950923593d93 (diff) | |
download | perl-84d2fa142c064fe21af5121174d51b764b9d9c69.tar.gz |
Regex fails when string is too long
This looks to be a simple oversight. All tests pass here.
Hugo
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4411,7 +4411,7 @@ NULL case CURLYM: /* /A{m,n}B/ where A is fixed-length */ /* This is an optimisation of CURLYX that enables us to push - * only a single backtracking state, no matter now many matches + * only a single backtracking state, no matter how many matches * there are in {m,n}. It relies on the pattern being constant * length, with no parens to influence future backrefs */ @@ -4574,7 +4574,8 @@ NULL case CURLYM_B_fail: /* just failed to match a B */ REGCP_UNWIND(ST.cp); if (ST.minmod) { - if (ST.count == ARG2(ST.me) /* max */) + I32 max = ARG2(ST.me); + if (max != REG_INFTY && ST.count == max) sayNO; goto curlym_do_A; /* try to match a further A */ } |