From: Pauli Date: Wed, 16 Mar 2022 03:36:57 +0000 (+1100) Subject: Fix Coverity 1498610 & 1498609: uninitised value X-Git-Tag: openssl-3.2.0-alpha1~2825 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e35d3a4808526b9586bb87d423d488cf1b18d95;p=thirdparty%2Fopenssl.git 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 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/17895) --- diff --git a/test/evp_fetch_prov_test.c b/test/evp_fetch_prov_test.c index d237082bdcc..422665d3120 100644 --- a/test/evp_fetch_prov_test.c +++ b/test/evp_fetch_prov_test.c @@ -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;