Skip to content
Commit 14258570 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Tomas Mraz
Browse files

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: fe79159b ("Implementation of the RFC 9579, PBMAC1 in PKCS#12")
Signed-off-by: default avatarJiasheng Jiang <jiashengjiangcool@outlook.com>

Reviewed-by: default avatarDmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: default avatarPaul Dale <ppzgs1@gmail.com>
Reviewed-by: default avatarTomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25370)

(cherry picked from commit f60b3c5f)
parent 934f9a02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment