diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2020-02-24 21:06:38 +0000 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-02-25 10:44:46 +0000 |
commit | 41e831f5588fe5ebfd879f4e570e85e12770b360 (patch) | |
tree | 2b058774a28390469333cc409dabb3fa207d7b8a /src | |
parent | ba4677063688beb62eb2f14e6c22ebbc92cce33d (diff) |
crypto-openssl: fix coverity warnings
Type: fix
Change-Id: Ia42ff39a0a33f89901b8333a9e6ca82ca9805cc6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/crypto_openssl/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/crypto_openssl/main.c b/src/plugins/crypto_openssl/main.c index 7775958f9cd..1dea1756df5 100644 --- a/src/plugins/crypto_openssl/main.c +++ b/src/plugins/crypto_openssl/main.c @@ -73,7 +73,7 @@ openssl_ops_enc_cbc (vlib_main_t * vm, vnet_crypto_op_t * ops[], { vnet_crypto_op_t *op = ops[i]; vnet_crypto_key_t *key = vnet_crypto_get_key (op->key_index); - int out_len; + int out_len = 0; int iv_len; if (op->op == VNET_CRYPTO_OP_3DES_CBC_ENC) @@ -140,7 +140,7 @@ openssl_ops_dec_cbc (vlib_main_t * vm, vnet_crypto_op_t * ops[], { vnet_crypto_op_t *op = ops[i]; vnet_crypto_key_t *key = vnet_crypto_get_key (op->key_index); - int out_len; + int out_len = 0; EVP_DecryptInit_ex (ctx, cipher, NULL, key->data, op->iv); @@ -196,7 +196,7 @@ openssl_ops_enc_gcm (vlib_main_t * vm, vnet_crypto_op_t * ops[], { vnet_crypto_op_t *op = ops[i]; vnet_crypto_key_t *key = vnet_crypto_get_key (op->key_index); - int len; + int len = 0; if (op->flags & VNET_CRYPTO_OP_FLAG_INIT_IV) RAND_bytes (op->iv, 8); @@ -238,7 +238,7 @@ openssl_ops_dec_gcm (vlib_main_t * vm, vnet_crypto_op_t * ops[], { vnet_crypto_op_t *op = ops[i]; vnet_crypto_key_t *key = vnet_crypto_get_key (op->key_index); - int len; + int len = 0; EVP_DecryptInit_ex (ctx, cipher, 0, 0, 0); EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_IVLEN, 12, 0); @@ -284,7 +284,7 @@ openssl_ops_hmac (vlib_main_t * vm, vnet_crypto_op_t * ops[], { vnet_crypto_op_t *op = ops[i]; vnet_crypto_key_t *key = vnet_crypto_get_key (op->key_index); - unsigned int out_len; + unsigned int out_len = 0; size_t sz = op->digest_len ? op->digest_len : EVP_MD_size (md); HMAC_Init_ex (ctx, key->data, vec_len (key->data), md, NULL); |