[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Mon Dec 7 19:53:05 UTC 2015


The branch master has been updated
       via  39d5193201cd0d73afebbd8c08f641b541c02b77 (commit)
      from  b91dd150d2b9b5ddca37722e7f52ea59ba7f80da (commit)


- Log -----------------------------------------------------------------
commit 39d5193201cd0d73afebbd8c08f641b541c02b77
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Dec 7 20:37:08 2015 +0100

    Fix clang complaints about uninitialised variables.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/pkcs12/p12_key.c | 6 +++---
 crypto/srp/srp_lib.c    | 4 ++--
 ssl/t1_enc.c            | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/crypto/pkcs12/p12_key.c b/crypto/pkcs12/p12_key.c
index 3efdd4a..6963a97 100644
--- a/crypto/pkcs12/p12_key.c
+++ b/crypto/pkcs12/p12_key.c
@@ -104,12 +104,12 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
                        int saltlen, int id, int iter, int n,
                        unsigned char *out, const EVP_MD *md_type)
 {
-    unsigned char *B, *D, *I, *p, *Ai;
+    unsigned char *B = NULL, *D = NULL, *I = NULL, *p = NULL, *Ai = NULL;
     int Slen, Plen, Ilen, Ijlen;
     int i, j, u, v;
     int ret = 0;
-    BIGNUM *Ij, *Bpl1;          /* These hold Ij and B + 1 */
-    EVP_MD_CTX *ctx;
+    BIGNUM *Ij = NULL, *Bpl1 = NULL; /* These hold Ij and B + 1 */
+    EVP_MD_CTX *ctx = NULL;
 #ifdef  DEBUG_KEYGEN
     unsigned char *tmpout = out;
     int tmpn = n;
diff --git a/crypto/srp/srp_lib.c b/crypto/srp/srp_lib.c
index 0a073b6..4b0ae0d 100644
--- a/crypto/srp/srp_lib.c
+++ b/crypto/srp/srp_lib.c
@@ -106,9 +106,9 @@ BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N)
 {
     /* k = SHA1(PAD(A) || PAD(B) ) -- tls-srp draft 8 */
 
-    BIGNUM *u;
+    BIGNUM *u = NULL;
     unsigned char cu[SHA_DIGEST_LENGTH];
-    unsigned char *cAB;
+    unsigned char *cAB = NULL;
     EVP_MD_CTX *ctxt = NULL;
     int longN;
     if ((A == NULL) || (B == NULL) || (N == NULL))
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 5889558..2d96330 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -157,8 +157,8 @@ static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
 {
     int chunk;
     size_t j;
-    EVP_MD_CTX *ctx, *ctx_tmp, *ctx_init;
-    EVP_PKEY *mac_key;
+    EVP_MD_CTX *ctx = NULL, *ctx_tmp = NULL, *ctx_init = NULL;
+    EVP_PKEY *mac_key = NULL;
     unsigned char A1[EVP_MAX_MD_SIZE];
     size_t A1_len;
     int ret = 0;


More information about the openssl-commits mailing list