Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common copy the terminating NUL (njoly)
details: https://anonhg.NetBSD.org/src/rev/4db29bedf176
branches: trunk
changeset: 350947:4db29bedf176
user: christos <christos%NetBSD.org@localhost>
date: Sat Jan 28 15:01:01 2017 +0000
description:
copy the terminating NUL (njoly)
diffstat:
sys/compat/linux/common/linux_file64.c | 6 +++---
sys/compat/linux/common/linux_misc.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 5a5af4c293f9 -r 4db29bedf176 sys/compat/linux/common/linux_file64.c
--- a/sys/compat/linux/common/linux_file64.c Sat Jan 28 13:21:11 2017 +0000
+++ b/sys/compat/linux/common/linux_file64.c Sat Jan 28 15:01:01 2017 +0000
@@ -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 @@
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 */
diff -r 5a5af4c293f9 -r 4db29bedf176 sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Sat Jan 28 13:21:11 2017 +0000
+++ b/sys/compat/linux/common/linux_misc.c Sat Jan 28 15:01:01 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $ */
+/* $NetBSD: linux_misc.c,v 1.237 2017/01/28 15:01:01 christos Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.236 2017/01/13 22:45:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.237 2017/01/28 15:01:01 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -788,7 +788,7 @@
*((char *)&idb + idb.d_reclen - 1) = bdp->d_type;
}
memcpy(idb.d_name, bdp->d_name,
- MIN(sizeof(idb.d_name), bdp->d_namlen));
+ MIN(sizeof(idb.d_name), bdp->d_namlen + 1));
if ((error = copyout((void *)&idb, outp, linux_reclen)))
goto out;
/* advance past this real entry */
Home |
Main Index |
Thread Index |
Old Index