mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Add check for buffer size versus pad size in DoCertificateStatus()
This commit is contained in:
@@ -10252,8 +10252,11 @@ static int DoCertificateStatus(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
SendAlert(ssl, alert_fatal, bad_certificate_status_response);
|
SendAlert(ssl, alert_fatal, bad_certificate_status_response);
|
||||||
|
|
||||||
if (IsEncryptionOn(ssl, 0))
|
if (IsEncryptionOn(ssl, 0)) {
|
||||||
|
if (*inOutIdx + ssl->keys.padSz > size)
|
||||||
|
return BUFFER_E;
|
||||||
*inOutIdx += ssl->keys.padSz;
|
*inOutIdx += ssl->keys.padSz;
|
||||||
|
}
|
||||||
|
|
||||||
WOLFSSL_LEAVE("DoCertificateStatus", ret);
|
WOLFSSL_LEAVE("DoCertificateStatus", ret);
|
||||||
WOLFSSL_END(WC_FUNC_CERTIFICATE_STATUS_DO);
|
WOLFSSL_END(WC_FUNC_CERTIFICATE_STATUS_DO);
|
||||||
|
Reference in New Issue
Block a user