mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-06 01:30:40 +03:00
Merge pull request #1824 from chipitsine/master
src/Cedar/Proto_OpenVPN.c: fix denial of service found by Cisco Talos
This commit is contained in:
commit
82ce34fccb
@ -147,7 +147,7 @@ bool OvsProcessData(void *param, TCP_RAW_DATA *in, FIFO *out)
|
||||
payload_size = READ_USHORT(FifoPtr(fifo));
|
||||
packet_size = payload_size + sizeof(USHORT);
|
||||
|
||||
if (payload_size == 0 || packet_size > sizeof(buf))
|
||||
if (payload_size == 0 || payload_size > (sizeof(buf) - sizeof(USHORT)))
|
||||
{
|
||||
ret = false;
|
||||
Debug("OvsProcessData(): Invalid payload size: %u bytes\n", payload_size);
|
||||
|
Loading…
Reference in New Issue
Block a user