Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/177c7469b114
branches: netbsd-9
changeset: 744822:177c7469b114
user: martin <martin%NetBSD.org@localhost>
date: Thu Feb 13 19:28:15 2020 +0000
description:
Pull up following revision(s) (requested by mlelstv in ticket #706):
sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.108
sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.109
Don't use strlcpy to copy untrusted input, it may not be NUL-terminated.
Where did the +1 came from ?
diffstat:
sys/compat/netbsd32/netbsd32_ioctl.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 4941c952702e -r 177c7469b114 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Wed Feb 12 20:11:33 2020 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Thu Feb 13 19:28:15 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.c,v 1.103 2019/05/17 07:37:12 msaitoh Exp $ */
+/* $NetBSD: netbsd32_ioctl.c,v 1.103.2.1 2020/02/13 19:28:15 martin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.103 2019/05/17 07:37:12 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.103.2.1 2020/02/13 19:28:15 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
@@ -146,7 +146,7 @@
struct if_addrprefreq *ifap, u_long cmd)
{
- strlcpy(ifap->ifap_name, ifap32->ifap_name, sizeof(ifap->ifap_name));
+ memcpy(ifap->ifap_name, ifap32->ifap_name, IFNAMSIZ);
ifap->ifap_preference = ifap32->ifap_preference;
memcpy(&ifap->ifap_addr, &ifap32->ifap_addr,
uimin(ifap32->ifap_addr.ss_len, _SS_MAXSIZE));
@@ -385,7 +385,7 @@
struct ieee80211req *ireq, u_long cmd)
{
- strlcpy(ireq->i_name, ireq32->i_name, IFNAMSIZ);
+ memcpy(ireq->i_name, ireq32->i_name, IFNAMSIZ);
ireq->i_type = ireq32->i_type;
ireq->i_val = ireq32->i_val;
ireq->i_len = ireq32->i_len;
@@ -398,7 +398,7 @@
{
int i;
- strlcpy(nwk->i_name, nwk32->i_name, IFNAMSIZ);
+ memcpy(nwk->i_name, nwk32->i_name, IFNAMSIZ);
nwk->i_wepon = nwk32->i_wepon;
nwk->i_defkid = nwk32->i_defkid;
for (i = 0; i < IEEE80211_WEP_NKID; i++) {
@@ -629,7 +629,7 @@
struct netbsd32_if_addrprefreq *ifap32, u_long cmd)
{
- strlcpy(ifap32->ifap_name, ifap->ifap_name, sizeof(ifap32->ifap_name));
+ memcpy(ifap32->ifap_name, ifap->ifap_name, IFNAMSIZ);
ifap32->ifap_preference = ifap->ifap_preference;
memcpy(&ifap32->ifap_addr, &ifap->ifap_addr,
uimin(ifap->ifap_addr.ss_len, _SS_MAXSIZE));
@@ -864,7 +864,7 @@
struct netbsd32_ieee80211req *ireq32, u_long cmd)
{
- strlcpy(ireq32->i_name, ireq->i_name, IFNAMSIZ);
+ memcpy(ireq32->i_name, ireq->i_name, IFNAMSIZ);
ireq32->i_type = ireq->i_type;
ireq32->i_val = ireq->i_val;
ireq32->i_len = ireq->i_len;
@@ -877,7 +877,7 @@
{
int i;
- strlcpy(nwk32->i_name, nwk->i_name, IFNAMSIZ);
+ memcpy(nwk32->i_name, nwk->i_name, IFNAMSIZ);
nwk32->i_wepon = nwk->i_wepon;
nwk32->i_defkid = nwk->i_defkid;
for (i = 0; i < IEEE80211_WEP_NKID; i++) {
Home |
Main Index |
Thread Index |
Old Index