From 98262647a9d2f3c65a7ceb1aaa81095522c1ef06 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 22 Feb 2018 12:54:21 -0600 Subject: supervise-daemon: zero out the cmdline buffer when it is allocated --- src/rc/supervise-daemon.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rc') 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, " "); -- cgit v1.2.3