summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_file64.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2017-01-28 15:01:01 +0000
committerchristos <christos@NetBSD.org>2017-01-28 15:01:01 +0000
commitee2ef874e982577e978c19bed88c55e8b5680a20 (patch)
treeba73c561356a9a12dcf929a0a984de9d6665478d /sys/compat/linux/common/linux_file64.c
parent338a00dc0e25436da29060035cc3e012e87c9e91 (diff)
copy the terminating NUL (njoly)
Diffstat (limited to 'sys/compat/linux/common/linux_file64.c')
-rw-r--r--sys/compat/linux/common/linux_file64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/common/linux_file64.c b/sys/compat/linux/common/linux_file64.c
index 40823c79e8f..e54db931de4 100644
--- a/sys/compat/linux/common/linux_file64.c
+++ b/sys/compat/linux/common/linux_file64.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $ */
+/* $NetBSD: linux_file64.c,v 1.58 2017/01/28 15:01:01 christos Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.57 2017/01/13 22:46:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.58 2017/01/28 15:01:01 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -355,7 +355,7 @@ again:
idb.d_off = off;
idb.d_reclen = (u_short)linux_reclen;
memcpy(idb.d_name, bdp->d_name, MIN(sizeof(idb.d_name),
- bdp->d_namlen));
+ bdp->d_namlen + 1));
if ((error = copyout((void *)&idb, outp, linux_reclen)))
goto out;
/* advance past this real entry */