From 98262647a9d2f3c65a7ceb1aaa81095522c1ef06 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 22 Feb 2018 12:54:21 -0600 Subject: [PATCH] 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, " ");