From: Daniel Fiala Date: Mon, 27 Jun 2022 11:36:48 +0000 (+0200) Subject: Allocate EVP_PBE_CTL with OPENSSL_zalloc. X-Git-Tag: openssl-3.2.0-alpha1~2467 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3211266aa23253ce8af2b98c4fd94a12a4afa7e4;p=thirdparty%2Fopenssl.git Allocate EVP_PBE_CTL with OPENSSL_zalloc. Fixes openssl#18598. Reviewed-by: Matt Caswell Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18666) --- diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c index 991ae2bd6cd..87b1856c19d 100644 --- a/crypto/evp/evp_pbe.c +++ b/crypto/evp/evp_pbe.c @@ -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;