Merge pull request #673 from cconlon/fortify
address fortify critical issues
This commit is contained in:
commit
dca57bf2f0
@ -10537,7 +10537,9 @@ int SendCertificate(WOLFSSL* ssl)
|
||||
|
||||
sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
|
||||
handshake, 1, 0);
|
||||
XFREE(input, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
if (inputSz > 0)
|
||||
XFREE(input, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
if (sendSz < 0)
|
||||
return sendSz;
|
||||
|
@ -1963,6 +1963,14 @@ int ToTraditionalEnc(byte* input, word32 sz,const char* password,int passwordSz)
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
|
||||
if (length > MAX_IV_SIZE) {
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
XFREE(salt, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(cbcIv, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#endif
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
|
||||
XMEMCPY(cbcIv, &input[inOutIdx], length);
|
||||
inOutIdx += length;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user