forked from wolfSSL/wolfssl
@@ -1612,6 +1612,11 @@ int wolfIO_HttpProcessResponse(int sfd, const char** appStrList,
|
||||
|
||||
/* read data if no \r\n or first time */
|
||||
if ((start == NULL) || (end == NULL)) {
|
||||
if (httpBufSz < len + 1) {
|
||||
return BUFFER_ERROR; /* can't happen, but Coverity thinks it
|
||||
* can.
|
||||
*/
|
||||
}
|
||||
result = wolfIO_Recv(sfd, (char*)httpBuf+len, httpBufSz-len-1, 0);
|
||||
if (result > 0) {
|
||||
len += result;
|
||||
|
@@ -12910,10 +12910,6 @@ int wc_AesXtsEncryptInit(XtsAes* xaes, const byte* i, word32 iSz,
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (iSz < AES_BLOCK_SIZE) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
XMEMCPY(stream->tweak_block, i, AES_BLOCK_SIZE);
|
||||
stream->bytes_crypted_with_this_tweak = 0;
|
||||
|
||||
|
@@ -4017,7 +4017,10 @@ int wc_RsaPSS_CheckPadding_ex2(const byte* in, word32 inSz, byte* sig,
|
||||
|
||||
/* Sig = Salt | Exp Hash */
|
||||
if (ret == 0) {
|
||||
if (sigSz != inSz + (word32)saltLen) {
|
||||
word32 totalSz;
|
||||
if ((WC_SAFE_SUM_WORD32(inSz, (word32)saltLen, totalSz) == 0) ||
|
||||
(sigSz != totalSz))
|
||||
{
|
||||
ret = PSS_SALTLEN_E;
|
||||
}
|
||||
}
|
||||
|
@@ -545,9 +545,15 @@ int wc_CryptKey(const char* password, int passwordSz, byte* salt,
|
||||
|
||||
ret = wc_PKCS12_PBKDF(key, unicodePasswd, idx, salt, saltSz,
|
||||
iterations, (int)derivedLen, typeH, 1);
|
||||
if (ret < 0)
|
||||
break;
|
||||
if (id != PBE_SHA1_RC4_128) {
|
||||
ret += wc_PKCS12_PBKDF(cbcIv, unicodePasswd, idx, salt,
|
||||
i = ret;
|
||||
ret = wc_PKCS12_PBKDF(cbcIv, unicodePasswd, idx, salt,
|
||||
saltSz, iterations, 8, typeH, 2);
|
||||
if (ret < 0)
|
||||
break;
|
||||
ret += i;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user