aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-03-14 20:05:45 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-03-14 20:05:45 -0500
commit5346fbf2c90b33b3abc01588e4727d4402f8db62 (patch)
tree32a4e7fe1c3f2582ffc2f4efc055ead3f387cfa9 /src/rc
parent92e6bdee12fa9d87a2535446ceccee261305e87c (diff)
supervise-daemon: fix off-by-one error
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/supervise-daemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 669db3a2..952c610b 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -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, " ");