good day for WinCE port of perl.
[p5sagit/p5-mst-13.2.git] / scope.c
diff --git a/scope.c b/scope.c
index a1fdfd1..4ff903f 100644 (file)
--- 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;
 }