diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-07-17 09:55:38 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-19 06:58:55 +0000 |
commit | 2beec16e955b826c44eaea93f62e1ff554d4c42a (patch) | |
tree | 53f8221177a36b065cfa16a2a7bc29f5eea9e49b /pp_hot.c | |
parent | c12982c86a2196a797f6a6b78ff87ba73a7de7fe (diff) | |
download | perl-2beec16e955b826c44eaea93f62e1ff554d4c42a.tar.gz |
fix flawed substitution-loop detection on zero-length matches
Message-Id: <199807171755.NAA27720@monk.mps.ohio-state.edu>
Subject: [PATCH 5.004_72] Substitution loop in devel branch
p4raw-id: //depot/perl@1560
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1590,7 +1590,9 @@ PP(pp_subst) DIE("panic: do_subst"); strend = s + len; - maxiters = (strend - s) + 10; + maxiters = 2*(strend - s) + 10; /* We can match twice at each + position, once with zero-length, + second time with non-zero. */ if (!rx->prelen && curpm) { pm = curpm; |