summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-15 00:24:28 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-15 00:24:28 +0000
commit67f66c9f7d52defdb9252dddd0d5e3b8d56b3d51 (patch)
treeb1a6af36eb7904a72ae7a7da39ae01de96a0bd05 /scope.c
parent8ff307387e2ad5064491875c725116604148c21d (diff)
downloadperl-67f66c9f7d52defdb9252dddd0d5e3b8d56b3d51.tar.gz
Read of uninitialized heap found by Third Degree
(e.g. in t/op/subst.t) p4raw-id: //depot/perl@16601
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index a1fdfd120e..4ff903fe3e 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;
}