summaryrefslogtreecommitdiff
path: root/providers
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-03-16 14:41:37 +1100
committerPauli <pauli@openssl.org>2022-07-06 10:37:12 +1000
commit2e3e9b4887b5077b949cdee490ecc1526b2c5509 (patch)
treeb57b17f8b0c91b3bc0793ddb57adb0082b9ed9ec /providers
parenta39a4c81041abf4833c9ccfe65c39aac18e7a2bf (diff)
downloadopenssl-new-2e3e9b4887b5077b949cdee490ecc1526b2c5509.tar.gz
Fix Coverity 1498605 & 1498606: uninitialised value
Both of these are false positives but better to be rid of the issue permanently than for it to repeatedly return to haunt us. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17896)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/ciphers/cipher_des_hw.c3
-rw-r--r--providers/implementations/ciphers/cipher_tdes_default_hw.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/providers/implementations/ciphers/cipher_des_hw.c b/providers/implementations/ciphers/cipher_des_hw.c
index a77fcc681a..a2d54b46ba 100644
--- a/providers/implementations/ciphers/cipher_des_hw.c
+++ b/providers/implementations/ciphers/cipher_des_hw.c
@@ -136,7 +136,8 @@ static int cipher_hw_des_cfb1_cipher(PROV_CIPHER_CTX *ctx, unsigned char *out,
{
size_t n, chunk = MAXCHUNK / 8;
DES_key_schedule *key = &(((PROV_DES_CTX *)ctx)->dks.ks);
- unsigned char c[1], d[1];
+ unsigned char c[1];
+ unsigned char d[1] = { 0 };
if (inl < chunk)
chunk = inl;
diff --git a/providers/implementations/ciphers/cipher_tdes_default_hw.c b/providers/implementations/ciphers/cipher_tdes_default_hw.c
index 53cbbad571..ccdf3941c8 100644
--- a/providers/implementations/ciphers/cipher_tdes_default_hw.c
+++ b/providers/implementations/ciphers/cipher_tdes_default_hw.c
@@ -99,7 +99,8 @@ static int ossl_cipher_hw_tdes_cfb1(PROV_CIPHER_CTX *ctx, unsigned char *out,
{
PROV_TDES_CTX *tctx = (PROV_TDES_CTX *)ctx;
size_t n;
- unsigned char c[1], d[1];
+ unsigned char c[1];
+ unsigned char d[1] = { 0 };
if (ctx->use_bits == 0)
inl *= 8;