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