add checks for the return values of BN_new(), sk_RSA_PRIME_INFO_new_reserve(),
authorx2018 <xkernel.wang@foxmail.com>
Fri, 22 Oct 2021 14:50:27 +0000 (22:50 +0800)
committerPauli <pauli@openssl.org>
Tue, 26 Oct 2021 22:36:55 +0000 (08:36 +1000)
commit9dddcd90a1350fa63486cbf3226c3eee79f9aff5
treef55ee0a9a4318165e3d40cc6a6e2a0b4db69e6d8
parent7220085f22cf6c49933ea8287eb15db57f7ab0db
add checks for the return values of BN_new(), sk_RSA_PRIME_INFO_new_reserve(),
EVP_PKEY_CTX_new_from_pkey() and EVP_CIPHER_CTX_new().
Otherwise may result in memory errors.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16892)
crypto/cms/cms_pwri.c
crypto/dsa/dsa_sign.c
crypto/ec/ec_asn1.c
crypto/evp/p_lib.c
crypto/pem/pvkfmt.c
crypto/rsa/rsa_backend.c