Fix a bogus warning about an uninitialised var
authorMatt Caswell <matt@openssl.org>
Tue, 22 May 2018 12:34:42 +0000 (13:34 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 23 May 2018 14:13:23 +0000 (15:13 +0100)
The variable in question can never be used uninitialised, but we silence
the compiler anyway.

Fixes #6301

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6329)

crypto/rsa/rsa_oaep.c

index 9a01b4a..9def7a0 100644 (file)
@@ -120,7 +120,7 @@ int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
                                       int plen, const EVP_MD *md,
                                       const EVP_MD *mgf1md)
 {
-    int i, dblen, mlen = -1, one_index = 0, msg_index;
+    int i, dblen = 0, mlen = -1, one_index = 0, msg_index;
     unsigned int good, found_one_byte;
     const unsigned char *maskedseed, *maskeddb;
     /*