summaryrefslogtreecommitdiff
path: root/net/mptcp/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mptcp/options.c')
-rw-r--r--net/mptcp/options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1aec01686c1a..25189595ed1d 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -375,6 +375,8 @@ void mptcp_get_options(const struct sock *sk,
length--;
continue;
default:
+ if (length < 2)
+ return;
opsize = *ptr++;
if (opsize < 2) /* "silly options" */
return;