From: Jarkko Hietaniemi Date: Wed, 15 May 2002 00:24:28 +0000 (+0000) Subject: Read of uninitialized heap found by Third Degree X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc5990859d9ad86b15371dbc1a77b5f95369a3f2;p=p5sagit%2Fp5-mst-13.2.git Read of uninitialized heap found by Third Degree (e.g. in t/op/subst.t) p4raw-id: //depot/perl@16601 --- diff --git a/scope.c b/scope.c index a1fdfd1..4ff903f 100644 --- a/scope.c +++ b/scope.c @@ -80,7 +80,9 @@ Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems) si->si_cxmax = cxitems - 1; si->si_cxix = -1; si->si_type = PERLSI_UNDEF; - New(56, si->si_cxstack, cxitems, PERL_CONTEXT); + /* Needs to be Newz() because PUSHSUBST() in pp_subst() + * might otherwise read uninitialized heap. */ + Newz(56, si->si_cxstack, cxitems, PERL_CONTEXT); return si; }