fix -Wconditional-uninitialized

This commit is contained in:
toddouska 2014-03-02 11:11:39 -08:00
parent 7b00374930
commit f0f6497526
2 changed files with 5 additions and 5 deletions

View File

@ -800,7 +800,7 @@ void bench_dh(void)
int i, ret;
byte tmp[1024];
size_t bytes;
word32 idx = 0, pubSz, privSz, pubSz2, privSz2, agreeSz;
word32 idx = 0, pubSz, privSz = 0, pubSz2, privSz2, agreeSz;
byte pub[256]; /* for 2048 bit */
byte priv[256]; /* for 2048 bit */

View File

@ -10336,8 +10336,8 @@ static void PickHashSigAlgo(CYASSL* ssl,
/* RSA */
#ifndef NO_RSA
if (ssl->peerRsaKeyPresent != 0) {
byte* out;
int outLen;
byte* out = NULL;
int outLen = 0;
byte doUserRsa = 0;
#ifdef HAVE_PK_CALLBACKS
@ -10388,12 +10388,12 @@ static void PickHashSigAlgo(CYASSL* ssl,
sigSz = EncodeSignature(encodedSig, digest, digestSz, typeH);
if (outLen == (int)sigSz && XMEMCMP(out, encodedSig,
if (outLen == (int)sigSz && out && XMEMCMP(out, encodedSig,
min(sigSz, MAX_ENCODED_SIG_SZ)) == 0)
ret = 0; /* verified */
}
else {
if (outLen == FINISHED_SZ && XMEMCMP(out,
if (outLen == FINISHED_SZ && out && XMEMCMP(out,
&ssl->certHashes, FINISHED_SZ) == 0)
ret = 0; /* verified */
}