supervise-daemon: zero out the cmdline buffer when it is allocated
This commit is contained in:
parent
5868abe97b
commit
98262647a9
@ -233,6 +233,7 @@ static char *make_cmdline(char **argv)
|
|||||||
for (c = argv; c && *c; c++)
|
for (c = argv; c && *c; c++)
|
||||||
len += (strlen(*c) + 1);
|
len += (strlen(*c) + 1);
|
||||||
cmdline = xmalloc(len);
|
cmdline = xmalloc(len);
|
||||||
|
memset(cmdline, 0, len);
|
||||||
for (c = argv; c && *c; c++) {
|
for (c = argv; c && *c; c++) {
|
||||||
strcat(cmdline, *c);
|
strcat(cmdline, *c);
|
||||||
strcat(cmdline, " ");
|
strcat(cmdline, " ");
|
||||||
|
Loading…
Reference in New Issue
Block a user