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: [email protected]
Cc: [email protected]

Signed-off-by: Chaoyong He <[email protected]>
Reviewed-by: Long Wu <[email protected]>
Reviewed-by: Peng Zhang <[email protected]>
---
 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

Reply via email to