aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorJonas Gorski <[email protected]>2012-09-18 14:09:08 +0200
committerRalf Baechle <[email protected]>2012-10-01 11:36:34 +0200
commitd21a7713464c7d35b2cce1fe7f7d87928d6a047e (patch)
tree7ab75a5e3f714ca7ad2eea77cd293bcd1c1d4a8c /lib/mpi/mpiutil.c
parent0b3e06fdc68a06e68687da4eb009ff484bfab449 (diff)
MIPS: BCM63XX: Properly handle mac address octet overflow
While calculating the mac address the pointer for the current octet was never reset back to the least significant one after being decremented because of an octet overflow. This resulted in the code continuing to increment at the current octet, potentially generating duplicate or invalid mac addresses. As a second issue the pointer was allowed to advance up to the most significant octet, modifying the OUI, and potentially changing the type of mac address. Rewrite the code so it resets the pointer to the least significant in each outer loop step, and bails out when the least significant octet of the OUI is reached. Signed-off-by: Jonas Gorski <[email protected]> Cc: [email protected] Cc: Maxime Bizon <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Sergei Shtylyov <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/4348/ Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions