Navigation Menu

Skip to content

Commit

Permalink
Check incoming data packets don't exceed MTU
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jan 26, 2015
1 parent ee445d9 commit 7fd8a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oncp.c
Expand Up @@ -1308,7 +1308,7 @@ static int oncp_receive_data(struct openconnect_info *vpninfo, int len, int unre
}

/* Should never happen, but would cause an endless loop if it did. */
if (!pktlen)
if (!pktlen || pktlen > vpninfo->ip_info.mtu)
goto badlen;

/* Receive this packet */
Expand Down

0 comments on commit 7fd8a86

Please sign in to comment.