From c471f617b7d8ddc48bc6faad1425678ec6353ee1 Mon Sep 17 00:00:00 2001 From: David Given Date: Mon, 16 Jan 2017 22:45:03 +0100 Subject: [PATCH] Ensure that memory is zero-initialised. --- mach/proto/ncg/salloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mach/proto/ncg/salloc.c b/mach/proto/ncg/salloc.c index e110d75ad..7ce1287bb 100644 --- a/mach/proto/ncg/salloc.c +++ b/mach/proto/ncg/salloc.c @@ -37,7 +37,7 @@ void chkstr(); string myalloc(size) { register string p; - p = (string) malloc((unsigned)size); + p = (string) calloc((unsigned)size, 1); if (p==0) fatal("Out of memory"); return(p); -- 2.34.1