diff options
author | phk <phk@FreeBSD.org> | 2003-11-19 15:28:21 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-11-19 15:28:21 +0000 |
commit | 2a56ea9233a11583b4ff53e21188d2ac489bd55c (patch) | |
tree | 5b7ac90c2b3cdcb3860ee3a8e141d78b232ca672 /usr.sbin/mtree | |
parent | 3a434d321203a61ed371a677729d5ecd743d18ce (diff) | |
download | FreeBSD-src-2a56ea9233a11583b4ff53e21188d2ac489bd55c.zip FreeBSD-src-2a56ea9233a11583b4ff53e21188d2ac489bd55c.tar.gz |
Off by one error in malloc.
Approved by: re@
Diffstat (limited to 'usr.sbin/mtree')
-rw-r--r-- | usr.sbin/mtree/spec.c | 2 |
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) |