mirror of https://github.com/wolfSSL/wolfssl.git
Update call to DoAlert()
When handling the alerts, the return code wasn't checked for error codes. A corrupted alert message could cause a control flow issue.pull/1/head
parent
42a0f3500f
commit
17ab84eb07
|
@ -4724,9 +4724,12 @@ int ProcessReply(CYASSL* ssl)
|
||||||
|
|
||||||
case alert:
|
case alert:
|
||||||
CYASSL_MSG("got ALERT!");
|
CYASSL_MSG("got ALERT!");
|
||||||
if (DoAlert(ssl, ssl->buffers.inputBuffer.buffer,
|
ret = DoAlert(ssl, ssl->buffers.inputBuffer.buffer,
|
||||||
&ssl->buffers.inputBuffer.idx, &type) == alert_fatal)
|
&ssl->buffers.inputBuffer.idx, &type);
|
||||||
|
if (ret == alert_fatal)
|
||||||
return FATAL_ERROR;
|
return FATAL_ERROR;
|
||||||
|
else if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* catch warnings that are handled as errors */
|
/* catch warnings that are handled as errors */
|
||||||
if (type == close_notify)
|
if (type == close_notify)
|
||||||
|
|
Loading…
Reference in New Issue