]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Allocate EVP_PBE_CTL with OPENSSL_zalloc.
authorDaniel Fiala <daniel@openssl.org>
Mon, 27 Jun 2022 11:36:48 +0000 (13:36 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 28 Jun 2022 15:45:04 +0000 (17:45 +0200)
Fixes openssl#18598.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18666)

crypto/evp/evp_pbe.c

index 991ae2bd6cdf69ef5e9d08b93df1e4f9a7222857..87b1856c19d2b3a5b9f702c66473ce02afb29f5c 100644 (file)
@@ -204,7 +204,7 @@ int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
             goto err;
     }
 
-    if ((pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp))) == NULL)
+    if ((pbe_tmp = OPENSSL_zalloc(sizeof(*pbe_tmp))) == NULL)
         goto err;
 
     pbe_tmp->pbe_type = pbe_type;