From 76f5eb97229058841f83664cbff848a708626d3d Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 31 Aug 2023 12:55:41 +0100 Subject: ash: initialize basepf.buf in ash (2) Upstream commit ed4a24dfd (ash: initialize basepf.buf in ash) zeroes out the memory allocated for basepf.buf. busybox-w32 has a copy of this code early in ash_main(). Do the same there. --- shell/ash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/ash.c b/shell/ash.c index 634f4ce79..a19a3c686 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -16130,7 +16130,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv) INIT_G_memstack(); /* from init() */ - basepf.next_to_pgetc = basepf.buf = ckmalloc(IBUFSIZ); + basepf.next_to_pgetc = basepf.buf = ckzalloc(IBUFSIZ); basepf.linno = 1; if (argc == 3 && !strcmp(argv[1], "--fs")) { -- cgit v1.2.3-55-g6feb