summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/mtree/spec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c
index 1e26559..0407f78 100644
--- a/usr.sbin/mtree/spec.c
+++ b/usr.sbin/mtree/spec.c
@@ -238,7 +238,7 @@ set(char *t, NODE *ip)
lineno, val);
break;
case F_SLINK:
- ip->slink = malloc(strlen(val));
+ ip->slink = malloc(strlen(val) + 1);
if (ip->slink == NULL)
errx(1, "malloc");
if (strunvis(ip->slink, val) == -1)
OpenPOWER on IntegriCloud