fix a couple more uninitialized variables

This commit is contained in:
John Safranek 2014-03-02 18:38:12 -08:00
parent a50d2e1e21
commit ec7c79c12e
2 changed files with 6 additions and 8 deletions

View File

@ -3276,9 +3276,7 @@ static void DecodeCertExtensions(DecodedCert* cert)
byte* input = cert->extensions; byte* input = cert->extensions;
int length; int length;
word32 oid; word32 oid;
byte critical; byte critical = 0;
(void)critical;
CYASSL_ENTER("DecodeCertExtensions"); CYASSL_ENTER("DecodeCertExtensions");
@ -3391,7 +3389,6 @@ static void DecodeCertExtensions(DecodedCert* cert)
} }
idx += length; idx += length;
} }
(void)critical;
CYASSL_LEAVE("DecodeCertExtensions", 0); CYASSL_LEAVE("DecodeCertExtensions", 0);
return; return;

View File

@ -7856,8 +7856,8 @@ static void PickHashSigAlgo(CYASSL* ssl,
/* rsa */ /* rsa */
if (sigAlgo == rsa_sa_algo) if (sigAlgo == rsa_sa_algo)
{ {
int ret; int ret = 0;
byte* out; byte* out = NULL;
byte doUserRsa = 0; byte doUserRsa = 0;
#ifdef HAVE_PK_CALLBACKS #ifdef HAVE_PK_CALLBACKS
@ -7919,12 +7919,13 @@ static void PickHashSigAlgo(CYASSL* ssl,
encSigSz = EncodeSignature(encodedSig, digest, digestSz, typeH); encSigSz = EncodeSignature(encodedSig, digest, digestSz, typeH);
if (encSigSz != (word32)ret || XMEMCMP(out, encodedSig, if (encSigSz != (word32)ret || !out || XMEMCMP(out, encodedSig,
min(encSigSz, MAX_ENCODED_SIG_SZ)) != 0) min(encSigSz, MAX_ENCODED_SIG_SZ)) != 0)
return VERIFY_SIGN_ERROR; return VERIFY_SIGN_ERROR;
} }
else { else {
if (ret != sizeof(hash) || XMEMCMP(out, hash,sizeof(hash)) != 0) if (ret != sizeof(hash) || !out || XMEMCMP(out,
hash, sizeof(hash)) != 0)
return VERIFY_SIGN_ERROR; return VERIFY_SIGN_ERROR;
} }
} else } else