net: bmac: Fix read of MAC address from ROM
[ Upstream commit ef01cee2ee1b369c57a936166483d40942bcc3e3 ]
In bmac_get_station_address, We're reading two bytes at a time from ROM,
but we do that six times, resulting in 12 bytes of read & writes. This
means we will write off the end of the six-byte destination buffer.
This change fixes the for-loop to only read/write six bytes.
Based on a proposed fix from Finn Thain <firstname.lastname@example.org>.
Signed-off-by: Jeremy Kerr <email@example.com>
Reported-by: Stan Johnson <firstname.lastname@example.org>
Tested-by: Stan Johnson <email@example.com>
Reported-by: Finn Thain <firstname.lastname@example.org>
Signed-off-by: David S. Miller <email@example.com>
Signed-off-by: Sasha Levin <firstname.lastname@example.org>
1 file changed