提交 39d51932 编写于 作者: R Richard Levitte

Fix clang complaints about uninitialised variables.

Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 b91dd150
...@@ -104,12 +104,12 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, ...@@ -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, int saltlen, int id, int iter, int n,
unsigned char *out, const EVP_MD *md_type) 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 Slen, Plen, Ilen, Ijlen;
int i, j, u, v; int i, j, u, v;
int ret = 0; int ret = 0;
BIGNUM *Ij, *Bpl1; /* These hold Ij and B + 1 */ BIGNUM *Ij = NULL, *Bpl1 = NULL; /* These hold Ij and B + 1 */
EVP_MD_CTX *ctx; EVP_MD_CTX *ctx = NULL;
#ifdef DEBUG_KEYGEN #ifdef DEBUG_KEYGEN
unsigned char *tmpout = out; unsigned char *tmpout = out;
int tmpn = n; int tmpn = n;
......
...@@ -106,9 +106,9 @@ BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N) ...@@ -106,9 +106,9 @@ BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N)
{ {
/* k = SHA1(PAD(A) || PAD(B) ) -- tls-srp draft 8 */ /* k = SHA1(PAD(A) || PAD(B) ) -- tls-srp draft 8 */
BIGNUM *u; BIGNUM *u = NULL;
unsigned char cu[SHA_DIGEST_LENGTH]; unsigned char cu[SHA_DIGEST_LENGTH];
unsigned char *cAB; unsigned char *cAB = NULL;
EVP_MD_CTX *ctxt = NULL; EVP_MD_CTX *ctxt = NULL;
int longN; int longN;
if ((A == NULL) || (B == NULL) || (N == NULL)) if ((A == NULL) || (B == NULL) || (N == NULL))
......
...@@ -157,8 +157,8 @@ static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec, ...@@ -157,8 +157,8 @@ static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
{ {
int chunk; int chunk;
size_t j; size_t j;
EVP_MD_CTX *ctx, *ctx_tmp, *ctx_init; EVP_MD_CTX *ctx = NULL, *ctx_tmp = NULL, *ctx_init = NULL;
EVP_PKEY *mac_key; EVP_PKEY *mac_key = NULL;
unsigned char A1[EVP_MAX_MD_SIZE]; unsigned char A1[EVP_MAX_MD_SIZE];
size_t A1_len; size_t A1_len;
int ret = 0; int ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册