summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-06-19 02:00:43 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2003-06-18 19:19:38 +0000
commit080c2decc1c1070c5ce819e741a37407aa249711 (patch)
tree105c43f4499e4c1eb2ce3938c9834709fc10ac60 /pp.c
parentbc2f65e02ab268c64852d8d5a231dbdd758c29db (diff)
downloadperl-080c2decc1c1070c5ce819e741a37407aa249711.tar.gz
Re: [perl #22727] split() with re_eval segfaults/panics
Message-ID: <20030618200043.GA1249@ratsnest.hole> p4raw-id: //depot/perl@19814
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/pp.c b/pp.c
index eccf7eb0c9..fc6a7bf37e 100644
--- a/pp.c
+++ b/pp.c
@@ -4658,13 +4658,13 @@ PP(pp_split)
}
else {
maxiters += slen * rx->nparens;
- while (s < strend && --limit
-/* && (!rx->check_substr
- || ((s = CALLREG_INTUIT_START(aTHX_ rx, sv, s, strend,
- 0, NULL))))
-*/ && CALLREGEXEC(aTHX_ rx, s, strend, orig,
- 1 /* minend */, sv, NULL, 0))
+ while (s < strend && --limit)
{
+ PUTBACK;
+ i = CALLREGEXEC(aTHX_ rx, s, strend, orig, 1 , sv, NULL, 0);
+ SPAGAIN;
+ if (i == 0)
+ break;
TAINT_IF(RX_MATCH_TAINTED(rx));
if (RX_MATCH_COPIED(rx) && rx->subbeg != orig) {
m = s;
@@ -4703,7 +4703,6 @@ PP(pp_split)
}
}
s = rx->endp[0] + orig;
- PUTBACK;
}
}