diff options
author | Ron Yorston <rmy@pobox.com> | 2023-08-31 12:55:41 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-08-31 12:55:41 +0100 |
commit | 76f5eb97229058841f83664cbff848a708626d3d (patch) | |
tree | 2ed394b39d36375b17b598c0a679f50b2fcd506b | |
parent | f49e467a3986b888d5be3dd5c29ac4f3e21cba0e (diff) | |
download | busybox-w32-76f5eb97229058841f83664cbff848a708626d3d.tar.gz busybox-w32-76f5eb97229058841f83664cbff848a708626d3d.tar.bz2 busybox-w32-76f5eb97229058841f83664cbff848a708626d3d.zip |
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.
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
16130 | INIT_G_memstack(); | 16130 | INIT_G_memstack(); |
16131 | 16131 | ||
16132 | /* from init() */ | 16132 | /* from init() */ |
16133 | basepf.next_to_pgetc = basepf.buf = ckmalloc(IBUFSIZ); | 16133 | basepf.next_to_pgetc = basepf.buf = ckzalloc(IBUFSIZ); |
16134 | basepf.linno = 1; | 16134 | basepf.linno = 1; |
16135 | 16135 | ||
16136 | if (argc == 3 && !strcmp(argv[1], "--fs")) { | 16136 | if (argc == 3 && !strcmp(argv[1], "--fs")) { |