mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Merge PR #1018: Proto_OpenVPN.c: fix segmentation fault in OvsProceccRecvPacket()
This commit is contained in:
commit
7349c4b16a
@ -681,10 +681,12 @@ void OvsProceccRecvPacket(OPENVPN_SERVER *s, UDPPACKET *p)
|
|||||||
{
|
{
|
||||||
// Decrypt
|
// Decrypt
|
||||||
size = OvsDecrypt(c->CipherDecrypt, c->MdRecv, c->IvRecv, data, recv_packet->Data, recv_packet->DataSize);
|
size = OvsDecrypt(c->CipherDecrypt, c->MdRecv, c->IvRecv, data, recv_packet->Data, recv_packet->DataSize);
|
||||||
|
if (size > sizeof(UINT))
|
||||||
// Seek buffer after the packet ID
|
{
|
||||||
data += sizeof(UINT);
|
// Seek buffer after the packet ID
|
||||||
size -= sizeof(UINT);
|
data += sizeof(UINT);
|
||||||
|
size -= sizeof(UINT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update of last communication time
|
// Update of last communication time
|
||||||
|
Loading…
Reference in New Issue
Block a user