[Privoxy-commits] [privoxy] 02/02: OpenSSL generate_key(): Initialize the variables "exp", "rsa" and "ec_key"

User Git git at git.privoxy.org
Tue Jun 9 17:19:54 CEST 2026


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit 0783764ef56041e1ce7894d64039efd10a4884db
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Jun 9 03:33:39 2026 +0200

    OpenSSL generate_key(): Initialize the variables "exp", "rsa" and "ec_key"
    
    ... when OPENSSL_VERSION_NUMBER is below 0x30000000L to prevent
    uninitialized pointers from being passed to the relevant free
    functions if EVP_PKEY_new() fails.
    
    Reported by Dirk Mueller in SF#949.
---
 openssl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/openssl.c b/openssl.c
index 8e254913..ad668b44 100644
--- a/openssl.c
+++ b/openssl.c
@@ -1446,9 +1446,9 @@ static int generate_key(struct client_state *csp, char **key_buf)
    int ret = 0;
    char* key_file_path;
 #if (OPENSSL_VERSION_NUMBER < 0x30000000L)
-   BIGNUM *exp;
-   RSA *rsa;
-   EC_KEY *ec_key;
+   BIGNUM *exp = NULL;
+   RSA *rsa = NULL;
+   EC_KEY *ec_key = NULL;
 #endif
    EVP_PKEY *key;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list