]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix Coverity 1498610 & 1498609: uninitised value
authorPauli <pauli@openssl.org>
Wed, 16 Mar 2022 03:36:57 +0000 (14:36 +1100)
committerPauli <pauli@openssl.org>
Wed, 23 Mar 2022 00:05:30 +0000 (11:05 +1100)
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)

test/evp_fetch_prov_test.c

index d237082bdcc0a8875a45ab4b051d73408ba4fb7c..422665d3120cbd0282d6f21b69ecd93f7130bed7 100644 (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;