From: Marcus Meissner Date: Tue, 6 Sep 2016 09:01:21 +0000 (+0200) Subject: initialize the RSA struct to 0. X-Git-Tag: OpenSSL_1_0_2i~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6180c0ff0c34b4029bd9d1bec519c8cbc6be4808;p=oweals%2Fopenssl.git initialize the RSA struct to 0. This helps with program code linked against static builds accessing a uninitialized ->engine pointer. CLA: none; trivial Reviewed-by: Tim Hudson Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1540) --- diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index a6805debc8..6ea6b40dc6 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -143,6 +143,7 @@ RSA *RSA_new_method(ENGINE *engine) RSAerr(RSA_F_RSA_NEW_METHOD, ERR_R_MALLOC_FAILURE); return NULL; } + memset(ret,0,sizeof(RSA)); ret->meth = RSA_get_default_method(); #ifndef OPENSSL_NO_ENGINE