diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-14 16:22:39 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-14 16:22:39 +0000 |
commit | 0033605d21c115bf932c13b3219a6ea9a9088d20 (patch) | |
tree | f2262096d3079912f6b40df762865ccb89d239a2 /regexec.c | |
parent | 9957a2e3e158f4e81e60565d4555b3cdb404e14a (diff) | |
download | perl-0033605d21c115bf932c13b3219a6ea9a9088d20.tar.gz |
The regexec.c change of #3606 caused a core dump in fbm_instr()
if its caller re_intuit_start() was entered with strend == strpos
because end_shift ended up as -1. The patch ain't necessarily
correct but least the core dump is avoided.
p4raw-id: //depot/cfgperl@3671
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -358,6 +358,8 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, } restart: + if (end_shift < 0) + end_shift = 0; /* can happen when strend == strpos */ if (flags & REXEC_SCREAM) { SV *c = prog->check_substr; char *strbeg = SvPVX(sv); /* XXXX Assume PV_force() on SCREAM! */ |