supervise-daemon: fix off-by-one error
This commit is contained in:
parent
92e6bdee12
commit
5346fbf2c9
@ -232,8 +232,8 @@ static char *make_cmdline(char **argv)
|
||||
|
||||
for (c = argv; c && *c; c++)
|
||||
len += (strlen(*c) + 1);
|
||||
cmdline = xmalloc(len);
|
||||
memset(cmdline, 0, len);
|
||||
cmdline = xmalloc(len+1);
|
||||
memset(cmdline, 0, len+1);
|
||||
for (c = argv; c && *c; c++) {
|
||||
strcat(cmdline, *c);
|
||||
strcat(cmdline, " ");
|
||||
|
Loading…
Reference in New Issue
Block a user