diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-05 11:52:00 +0100 |
|---|---|---|
| committer | Jerome Forissier <[email protected]> | 2025-08-18 15:47:57 +0200 |
| commit | ed3b08874f4c47e287a1f0eb36fc61ff7d778cc9 (patch) | |
| tree | 4dfd09d3b60bf81a4b01f62197df041bd46e5fac | |
| parent | 4800a6a0b3fa9d00f1ec40233a0e16464987c24f (diff) | |
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 <[email protected]>
| -rw-r--r-- | drivers/net/ldpaa_eth/ldpaa_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index b72198ca530..94e62748239 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -458,7 +458,7 @@ static int ldpaa_eth_open(struct udevice *dev) link_state.up == 1 ? printf("up\n") : printf("error state\n"); #endif - memset(&d_queue, 0, sizeof(struct dpni_queue)); + memset(&d_queue, 0, sizeof(struct dpni_queue_id)); err = dpni_get_queue(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle, DPNI_QUEUE_RX, 0, 0, &d_queue_cfg, &d_queue); |
