net: ldpaa_eth: Fix buffer overflow in memset
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Tue, 5 Aug 2025 10:52:00 +0000 (11:52 +0100)
committerJerome Forissier <jerome.forissier@linaro.org>
Mon, 18 Aug 2025 13:47:57 +0000 (15:47 +0200)
commited3b08874f4c47e287a1f0eb36fc61ff7d778cc9
tree4dfd09d3b60bf81a4b01f62197df041bd46e5fac
parent4800a6a0b3fa9d00f1ec40233a0e16464987c24f
net: ldpaa_eth: Fix buffer overflow in memset

In ldpaa_eth_open a memset is used to initialise a struct to 0 but the
size passed is that of a different struct. Correct to pass the sizeof
the struct that is being initialised.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/net/ldpaa_eth/ldpaa_eth.c