mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 05:41:46 +08:00
0c5d725ebf
`RSA_free()` and friends are called in case of error from `RSA_new_method(ENGINE *e)` (or the respective equivalent functions). For the rest of the description I'll talk about `RSA_*`, but the same applies for the equivalent `DSA_free()`, `DH_free()`, `EC_KEY_free()`. If `RSA_new_method()` fails because the engine does not implement the required method, when `RSA_free(RSA *r)` is called, `r->meth == NULL` and a segfault happens while checking if `r->meth->finish` is defined. This commit fixes this issue by ensuring that `r->meth` is not NULL before dereferencing it to check for `r->meth->finish`. Fixes #7102 . Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7121) |
||
---|---|---|
.. | ||
build.info | ||
dsa_ameth.c | ||
dsa_asn1.c | ||
dsa_depr.c | ||
dsa_err.c | ||
dsa_gen.c | ||
dsa_key.c | ||
dsa_lib.c | ||
dsa_locl.h | ||
dsa_meth.c | ||
dsa_ossl.c | ||
dsa_pmeth.c | ||
dsa_prn.c | ||
dsa_sign.c | ||
dsa_vrf.c |