summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2015-01-20 04:46:11 +0000
committerbrad <brad@openbsd.org>2015-01-20 04:46:11 +0000
commitf695be9e48c86553678b151ad753bd908726bf62 (patch)
treee0a244ce448f6d2dad4611fb21503080b32e979f
parentDon't use utime(), so don't need <utime.h> (diff)
downloadwireguard-openbsd-f695be9e48c86553678b151ad753bd908726bf62.tar.xz
wireguard-openbsd-f695be9e48c86553678b151ad753bd908726bf62.zip
Fix size of the bcopy when extracting the MAC address.
From FreeBSD
-rw-r--r--sys/dev/ic/re.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index b296281a9e1..2e5e17f8182 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.170 2015/01/20 04:33:06 brad Exp $ */
+/* $OpenBSD: re.c,v 1.171 2015/01/20 04:46:11 brad Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -873,7 +873,7 @@ re_attach(struct rl_softc *sc, const char *intrstr)
re_read_eeprom(sc, (caddr_t)as, RL_EE_EADDR, 3);
for (i = 0; i < ETHER_ADDR_LEN / 2; i++)
as[i] = letoh16(as[i]);
- bcopy(as, eaddr, sizeof(eaddr));
+ bcopy(as, eaddr, ETHER_ADDR_LEN);
#ifdef __armish__
/*