patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/nfp: fix uninitialized variable
@ 2024-03-19  8:55 Chaoyong He
  2024-03-19 12:11 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2024-03-19  8:55 UTC (permalink / raw)
  To: dev; +Cc: oss-drivers, Chaoyong He, shihong.wang, stable, Long Wu, Peng Zhang

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@corigine.com
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-19 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19  8:55 [PATCH] net/nfp: fix uninitialized variable Chaoyong He
2024-03-19 12:11 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).