forked from wolfSSL/wolfssl
sanity check on input length before secure renegotiation compare
This commit is contained in:
@ -4788,6 +4788,11 @@ static int TLSX_SecureRenegotiation_Parse(WOLFSSL* ssl, byte* input,
|
||||
}
|
||||
}
|
||||
else if (*input == TLS_FINISHED_SZ) {
|
||||
if (length < TLS_FINISHED_SZ + 1) {
|
||||
WOLFSSL_MSG("SCR malformed buffer");
|
||||
ret = BUFFER_E;
|
||||
}
|
||||
else {
|
||||
input++; /* get past size */
|
||||
|
||||
/* validate client verify data */
|
||||
@ -4802,6 +4807,7 @@ static int TLSX_SecureRenegotiation_Parse(WOLFSSL* ssl, byte* input,
|
||||
WOLFSSL_MSG("SCR client verify data Failure");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user