From 6180c0ff0c34b4029bd9d1bec519c8cbc6be4808 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 6 Sep 2016 11:01:21 +0200 Subject: [PATCH] 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) --- crypto/rsa/rsa_lib.c | 1 + 1 file changed, 1 insertion(+) 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 -- 2.25.1