forked from wolfSSL/wolfssl
Merge pull request #673 from cconlon/fortify
address fortify critical issues
This commit is contained in:
@@ -10537,7 +10537,9 @@ int SendCertificate(WOLFSSL* ssl)
|
|||||||
|
|
||||||
sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
|
sendSz = BuildMessage(ssl, output, sendSz, input, inputSz,
|
||||||
handshake, 1, 0);
|
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)
|
if (sendSz < 0)
|
||||||
return sendSz;
|
return sendSz;
|
||||||
|
@@ -1963,6 +1963,14 @@ int ToTraditionalEnc(byte* input, word32 sz,const char* password,int passwordSz)
|
|||||||
return ASN_PARSE_E;
|
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);
|
XMEMCPY(cbcIv, &input[inOutIdx], length);
|
||||||
inOutIdx += length;
|
inOutIdx += length;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user