[PATCH v2 08/14] common/sfc_efx/base: fix annotations in get fixed port props
Ivan Malov <[email protected]>
| Newsgroups | org.dpdk.dev |
|---|---|
| Message-ID | <[email protected]> |
From: Andy Moreton <[email protected]> Code analysis reports a buffer overrun for the sup_cap_rawp argument. Fix the annotation to show the writable buffer size. Fixes: a90549f527eb ("common/sfc_efx/base: get netport fixed capabilities on probe") Cc: [email protected] Signed-off-by: Andy Moreton <[email protected]> Reviewed-by: Ivan Malov <[email protected]> Reviewed-by: Viacheslav Galaktionov <[email protected]> --- drivers/common/sfc_efx/base/efx_np.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/sfc_efx/base/efx_np.c b/drivers/common/sfc_efx/base/efx_np.c index baee83e58e..8b8e37c0e1 100644 --- a/drivers/common/sfc_efx/base/efx_np.c +++ b/drivers/common/sfc_efx/base/efx_np.c @@ -235,7 +235,8 @@ static __checkReturn efx_rc_t efx_np_get_fixed_port_props( __in efx_nic_t *enp, __in efx_np_handle_t nph, - __out_opt uint8_t *sup_cap_rawp, + __out_bcount_opt(MC_CMD_ETH_AN_FIELDS_LEN) + uint8_t *sup_cap_rawp, __out_opt uint32_t *sup_cap_maskp, __out_opt efx_qword_t *loopback_cap_maskp) { -- 2.47.3