re: Fix size of the bcopy when extracting ethernet address
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 11 Jun 2012 08:30:49 +0000 (16:30 +0800)
committerSascha Wildner <saw@online.de>
Mon, 11 Jun 2012 08:43:31 +0000 (10:43 +0200)
Reported-by: swildner@
sys/dev/netif/re/if_re.c

index 34d7b9a..ac30cc3 100644 (file)
@@ -3241,7 +3241,7 @@ re_get_eaddr(struct re_softc *sc, uint8_t *eaddr)
                        re_read_eeprom(sc, (caddr_t)as, eaddr_off, 3);
                        for (i = 0; i < ETHER_ADDR_LEN / 2; i++)
                                as[i] = le16toh(as[i]);
-                       bcopy(as, eaddr, sizeof(eaddr));
+                       bcopy(as, eaddr, ETHER_ADDR_LEN);
                        return;
                }
        }