Fixes for scan-build warnings.

This commit is contained in:
David Garske
2019-01-03 12:47:46 -08:00
parent 1201ffb13f
commit df2a0f9a4f
3 changed files with 3 additions and 5 deletions

View File

@ -2909,7 +2909,6 @@ int wc_AesSetIV(Aes* aes, const byte* iv)
int ret = wc_CryptoDev_AesCbcEncrypt(aes, out, in, sz);
if (ret != NOT_COMPILED_IN)
return ret;
ret = 0; /* reset error code and try using software */
}
#endif
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_AES)

View File

@ -9155,7 +9155,7 @@ int wc_KeyPemToDer(const unsigned char* pem, int pemSz,
XFREE(info, NULL, DYNAMIC_TYPE_ENCRYPTEDINFO);
#endif
if (ret < 0) {
if (ret < 0 || der == NULL) {
WOLFSSL_MSG("Bad Pem To Der");
}
else {
@ -9196,7 +9196,7 @@ int wc_CertPemToDer(const unsigned char* pem, int pemSz,
ret = PemToDer(pem, pemSz, type, &der, NULL, NULL, &eccKey);
if (ret < 0) {
if (ret < 0 || der == NULL) {
WOLFSSL_MSG("Bad Pem To Der");
}
else {
@ -9235,7 +9235,7 @@ int wc_PubKeyPemToDer(const unsigned char* pem, int pemSz,
}
ret = PemToDer(pem, pemSz, PUBLICKEY_TYPE, &der, NULL, NULL, NULL);
if (ret < 0) {
if (ret < 0 || der == NULL) {
WOLFSSL_MSG("Bad Pem To Der");
}
else {

View File

@ -959,7 +959,6 @@ static int InitSha256(wc_Sha256* sha256)
ret = wc_CryptoDev_Sha256Hash(sha256, NULL, 0, hash);
if (ret != NOT_COMPILED_IN)
return ret;
ret = 0; /* reset error code and try using software */
}
#endif