Fix Coverity 1498610 & 1498609: uninitised value

Both are false positives, but better to be rid of them forever than ignoring
them and having repeats.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17895)
This commit is contained in:
Pauli 2022-03-16 14:36:57 +11:00
parent 9e1a54f4a1
commit 3e35d3a480

View File

@ -212,7 +212,7 @@ static int test_explicit_EVP_MD_fetch_by_X509_ALGOR(int idx)
int ret = 0;
X509_ALGOR *algor = make_algor(NID_sha256);
const ASN1_OBJECT *obj;
char id[OSSL_MAX_NAME_SIZE];
char id[OSSL_MAX_NAME_SIZE] = { 0 };
if (algor == NULL)
return 0;
@ -328,7 +328,7 @@ static int test_explicit_EVP_CIPHER_fetch_by_X509_ALGOR(int idx)
int ret = 0;
X509_ALGOR *algor = make_algor(NID_aes_128_cbc);
const ASN1_OBJECT *obj;
char id[OSSL_MAX_NAME_SIZE];
char id[OSSL_MAX_NAME_SIZE] = { 0 };
if (algor == NULL)
return 0;