commit: 98262647a9d2f3c65a7ceb1aaa81095522c1ef06
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Feb 22 18:54:21 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Feb 22 18:54:21 2018 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=98262647
supervise-daemon: zero out the cmdline buffer when it is allocated
src/rc/supervise-daemon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index a858cf46..6d36a5aa 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -233,6 +233,7 @@ static char *make_cmdline(char **argv)
for (c = argv; c && *c; c++)
len += (strlen(*c) + 1);
cmdline = xmalloc(len);
+ memset(cmdline, 0, len);
for (c = argv; c && *c; c++) {
strcat(cmdline, *c);
strcat(cmdline, " ");