From: Kishore Padmanabha Date: Thu, 30 Apr 2020 21:42:12 +0000 (-0400) Subject: net/bnxt: fix overrun of ULP device params array X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=45e5e9518c9bdbdaa8382fa7a8e559440e415f9b;p=dpdk.git net/bnxt: fix overrun of ULP device params array Fix a buffer overrun issue spotted by coverity while accessing the array ulp_device_params. Note that the issue was observed in an internal Coverity scan. Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init") Signed-off-by: Kishore Padmanabha Reviewed-by: Mike Baucom Reviewed-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c b/drivers/net/bnxt/tf_ulp/ulp_template_db.c index 86384169fb..e89aefad4b 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c @@ -321,7 +321,7 @@ struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[] = { } }; -struct bnxt_ulp_device_params ulp_device_params[] = { +struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = { [BNXT_ULP_DEVICE_ID_WH_PLUS] = { .global_fid_enable = BNXT_ULP_SYM_YES, .byte_order = (enum bnxt_ulp_byte_order)