Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cedar/IPsec_L2TP.c')
-rw-r--r--src/Cedar/IPsec_L2TP.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Cedar/IPsec_L2TP.c b/src/Cedar/IPsec_L2TP.c
index 79860153..e036e1a5 100644
--- a/src/Cedar/IPsec_L2TP.c
+++ b/src/Cedar/IPsec_L2TP.c
@@ -792,6 +792,12 @@ L2TP_PACKET *ParseL2TPPacket(UDPPACKET *p)
size -= 2;
a.DataSize = a.Length - 6;
+
+ if (a.DataSize > size)
+ {
+ goto LABEL_ERROR;
+ }
+
a.Data = Clone(buf, a.DataSize);
buf += a.DataSize;