mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Fixes for scan-build warnings.
This commit is contained in:
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user