[PATCH] net/nfp: fix uninitialized variable
Chaoyong He
chaoyong.he at corigine.com
Tue Mar 19 09:55:07 CET 2024
CI found in the logic of 'nfp_aesgcm_iv_update()', the variable
'cfg_iv' may used uninitialized in some case.
Coverity issue: 415808
Fixes: 36361ca7fea2 ("net/nfp: fix data endianness problem")
Cc: shihong.wang at corigine.com
Cc: stable at dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
drivers/net/nfp/nfp_ipsec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_ipsec.c b/drivers/net/nfp/nfp_ipsec.c
index 205d1d594c..647bc2bb6d 100644
--- a/drivers/net/nfp/nfp_ipsec.c
+++ b/drivers/net/nfp/nfp_ipsec.c
@@ -526,7 +526,7 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,
char *iv_b;
char *iv_str;
const rte_be32_t *iv_value;
- uint8_t cfg_iv[NFP_ESP_IV_LENGTH];
+ uint8_t cfg_iv[NFP_ESP_IV_LENGTH] = {};
iv_str = strdup(iv_string);
if (iv_str == NULL) {
--
2.39.1
More information about the dev
mailing list