[PATCH v2] net/mvneta: fix possible out-of-bounds write
Stephen Hemminger
stephen at networkplumber.org
Wed Oct 9 17:09:14 CEST 2024
On Wed, 9 Oct 2024 06:08:45 +0000
Chengwen Feng <fengchengwen at huawei.com> wrote:
> + if (ifnames->idx >= NETA_NUM_ETH_PPIO) {
> + MVNETA_LOG(ERROR, "Detect too many ifnames!");
> + return -EINVAL;
> + }
> +
Looks good, but the wording is a bit awkward. Suggest:
if (ifnames->idx >= NETA_NUM_ETH_PPIO) {
MVNET_LOG(ERR, "Too many ifnames specified (max %u)",
NETA_NUM_ETH_PPIO);
return -EINVAL;
}
More information about the dev
mailing list