]> git.baikalelectronics.ru Git - uboot.git/commit
net: cortina_ni: buffer overrun
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 20 Feb 2021 09:44:04 +0000 (10:44 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 24 Feb 2021 21:51:49 +0000 (16:51 -0500)
commita112bcd675e6b2d000d89873e5506b0bed8cd53e
treef3dc7500422579ef8a93d0ed9bb7a5ca3e494dff
parent95f481d235018ff97cf7696b4720cda50746ca4c
net: cortina_ni: buffer overrun

When copying to a u32 field we should use sizeof(u32) and not
sizeof(*u32) in memcpy.

On 64bit systems like cortina_presidio-asic-emmc_defconfig using
sizeof(*u32) leads to a buffer overrun.

Fixes: 9d9f8f22c76e ("net: cortina_ni: Add eth support for Cortina Access CAxxxx SoCs")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
drivers/net/cortina_ni.c