method_eap: tolerate empty request packets
TLS methods call process_request_packet(NULL, 0) to check on the inner method for the payload to piggyback on the final handshake response. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
2282a2c45f
commit
7caa4b12a6
@ -234,6 +234,8 @@ EapPeerMethodResponseAction eap::method_eap::process_request_packet(
|
|||||||
_In_bytecount_(dwReceivedPacketSize) const void *pReceivedPacket,
|
_In_bytecount_(dwReceivedPacketSize) const void *pReceivedPacket,
|
||||||
_In_ DWORD dwReceivedPacketSize)
|
_In_ DWORD dwReceivedPacketSize)
|
||||||
{
|
{
|
||||||
|
if (dwReceivedPacketSize == 0)
|
||||||
|
return EapPeerMethodResponseActionNone;
|
||||||
if (dwReceivedPacketSize < offsetof(EapPacket, Data))
|
if (dwReceivedPacketSize < offsetof(EapPacket, Data))
|
||||||
throw win_runtime_error(EAP_E_EAPHOST_METHOD_INVALID_PACKET, __FUNCTION__ " Incomplete EAP packet header.");
|
throw win_runtime_error(EAP_E_EAPHOST_METHOD_INVALID_PACKET, __FUNCTION__ " Incomplete EAP packet header.");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user