summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/nsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/nsd/nsd.c')
-rw-r--r--usr.sbin/nsd/nsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/nsd/nsd.c b/usr.sbin/nsd/nsd.c
index b223a1f28b8..8dac3bf0f79 100644
--- a/usr.sbin/nsd/nsd.c
+++ b/usr.sbin/nsd/nsd.c
@@ -822,7 +822,7 @@ main(int argc, char *argv[])
if (l>0 && strncmp(nsd.chrootdir + (l-1), "/", 1) != 0) {
char *chroot_slash = region_alloc(nsd.region, sizeof(char)*(l+2));
memcpy(chroot_slash, nsd.chrootdir, sizeof(char)*(l+1));
- strncat(chroot_slash, "/", 1);
+ strlcat(chroot_slash, "/", sizeof(char)*(l+2));
nsd.chrootdir = chroot_slash;
++l;
}