summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-08 20:57:24 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-08 20:57:24 +0000
commit38d1b06f95ebaf0e4dc96d48047c7c7648c3ba3f (patch)
tree419c5a60ac46fb3f67c71841f867aad57c417c3e /regcomp.c
parent345da37894bdc1d7c49da4f1b4efb7421506b4b3 (diff)
downloadperl-38d1b06f95ebaf0e4dc96d48047c7c7648c3ba3f.tar.gz
lastparen in the regexp structure is never initialised, and so will
still be uninitialised after a failed match, yet various points in mg.c read it come what may. Should fix bug 38461. p4raw-id: //depot/perl@27133
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 12bfc1c491..8bcfb8f8e4 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2870,6 +2870,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm)
#endif
r->reganch = pm->op_pmflags & PMf_COMPILETIME;
r->nparens = RExC_npar - 1; /* set early to validate backrefs */
+ r->lastparen = 0; /* mg.c reads this. */
r->substrs = 0; /* Useful during FAIL. */
r->startp = 0; /* Useful during FAIL. */