]> git.ipfire.org Git - thirdparty/openssl.git/commit
crypto/pkcs12/p12_mutl.c: Add check and EVP_MD_free() for EVP_MD_fetch()
authorJiasheng Jiang <jiashengjiangcool@outlook.com>
Tue, 3 Sep 2024 19:18:47 +0000 (19:18 +0000)
committerTomas Mraz <tomas@openssl.org>
Thu, 5 Sep 2024 15:30:28 +0000 (17:30 +0200)
commitf60b3c5fdcf75fc3e9a257c2f67867ffae63006b
treea68208a8970ff0ebd0d85430c55cb17938edec24
parent8439337036bbfd940657b95e01e5bc08dc63d331
crypto/pkcs12/p12_mutl.c: Add check and EVP_MD_free() for EVP_MD_fetch()

Add check and EVP_MD_free() for EVP_MD_fetch() to avoid NULL pointer
dereference and memory leak, like "md_fetch".

Fixes: fe79159be0 ("Implementation of the RFC 9579, PBMAC1 in PKCS#12")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@outlook.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25370)
crypto/pkcs12/p12_mutl.c