[v2,1/2] net/bnxt: fix overrun of the ulp device params array
Checks
Commit Message
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
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 <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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)