]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix VS2019 compile error C4703: potentially uninitialized local pointer variable...
authorKelvin Lee <kiyolee@gmail.com>
Thu, 10 Sep 2020 05:58:13 +0000 (15:58 +1000)
committerPauli <pauli@openssl.org>
Thu, 5 Aug 2021 23:24:23 +0000 (09:24 +1000)
encode_key2text.c(689): error C4703: potentially uninitialized local pointer variable 'modulus_label' used
encode_key2text.c(691): error C4703: potentially uninitialized local pointer variable 'exponent_label' used

CLA: trivial

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12845)

providers/implementations/encode_decode/encode_key2text.c

index a1fc7ab498368bdc0568df361cfbe9a24d67d4ef..f8f9712e9618bc34738db5c5c54b25a44c7d249f 100644 (file)
@@ -633,8 +633,8 @@ static int rsa_to_text(BIO *out, const void *key, int selection)
 {
     const RSA *rsa = key;
     const char *type_label = "RSA key";
-    const char *modulus_label;
-    const char *exponent_label;
+    const char *modulus_label = NULL;
+    const char *exponent_label = NULL;
     const BIGNUM *rsa_d = NULL, *rsa_n = NULL, *rsa_e = NULL;
     STACK_OF(BIGNUM_const) *factors = NULL;
     STACK_OF(BIGNUM_const) *exps = NULL;