From: Tobias Brunner Date: Thu, 21 Apr 2022 13:40:12 +0000 (+0200) Subject: gcrypt: Initialize variables when en-/decrypting with RSA to avoid warnings X-Git-Tag: 5.9.6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=352fa96dfcc04264761fb3cdb0dbfa68bfe505c3;p=thirdparty%2Fstrongswan.git gcrypt: Initialize variables when en-/decrypting with RSA to avoid warnings --- diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c index 5ef7daf610..c9526cac87 100644 --- a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c +++ b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c @@ -281,8 +281,8 @@ METHOD(private_key_t, decrypt, bool, void *params, chunk_t encrypted, chunk_t *plain) { gcry_error_t err; - gcry_sexp_t in, out; - chunk_t label = chunk_empty, decrypted; + gcry_sexp_t in, out = NULL; + chunk_t label = chunk_empty, decrypted = chunk_empty; u_char *sexp; switch (scheme) diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c index 2200a21187..61e8514987 100644 --- a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c +++ b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c @@ -240,7 +240,7 @@ METHOD(public_key_t, encrypt_, bool, void *params, chunk_t plain, chunk_t *encrypted) { gcry_error_t err; - gcry_sexp_t in, out; + gcry_sexp_t in, out = NULL; chunk_t label = chunk_empty; u_char *sexp;