From: Kishore Padmanabha <[email protected]>
Fix a buffer overrun issue spotted by coverity while accessing
the array ulp_device_params.
Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")
Signed-off-by: Kishore Padmanabha <[email protected]>
Reviewed-by: Michael Baucom <[email protected]>
Reviewed-by: Ajit Khaparde <[email protected]>
---
drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
index 86384169f..e89aefad4 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)
--
2.21.1 (Apple Git-122.3)