From: Nicholas Clark Date: Wed, 8 Feb 2006 20:57:24 +0000 (+0000) Subject: lastparen in the regexp structure is never initialised, and so will X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=38d1b06f95ebaf0e4dc96d48047c7c7648c3ba3f;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/regcomp.c b/regcomp.c index 12bfc1c..8bcfb8f 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. */