X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/a991bd8d3e7fe02dbca0644054bab73c5b75324a..refs/heads/master:/bsd/netinet/raw_ip.c diff --git a/bsd/netinet/raw_ip.c b/bsd/netinet/raw_ip.c index a140e8925..2975ccff1 100644 --- a/bsd/netinet/raw_ip.c +++ b/bsd/netinet/raw_ip.c @@ -934,6 +934,9 @@ rip_attach(struct socket *so, int proto, struct proc *p) if ((so->so_state & SS_PRIV) == 0) { return EPERM; } + if (proto > UINT8_MAX) { + return EINVAL; + } error = soreserve(so, rip_sendspace, rip_recvspace); if (error) {