X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/ea3f04195ba4a5034c9c8e9b726d4f7ce96f1832..bca245acd4c03fd752d1a45f011ad495e60fe53d:/bsd/netinet/mptcp_subr.c?ds=sidebyside diff --git a/bsd/netinet/mptcp_subr.c b/bsd/netinet/mptcp_subr.c index 9e8637a92..356298cf7 100644 --- a/bsd/netinet/mptcp_subr.c +++ b/bsd/netinet/mptcp_subr.c @@ -2394,6 +2394,11 @@ mptcp_subflow_add(struct mptses *mpte, struct sockaddr *src, goto out_err; } + if (mpte->mpte_numflows > MPTCP_MAX_NUM_SUBFLOWS) { + error = EOVERFLOW; + goto out_err; + } + mpts = mptcp_subflow_alloc(); if (mpts == NULL) { os_log_error(mptcp_log_handle, "%s - %lx: malloc subflow failed\n",