diff options
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/af_irda.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 402af94..dd94de2 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -1104,6 +1104,9 @@ static int irda_create(struct net *net, struct socket *sock, int protocol, struct sock *sk; struct irda_sock *self; + if (protocol < 0 || protocol > SK_PROTOCOL_MAX) + return -EINVAL; + IRDA_DEBUG(2, "%s()\n", __func__); if (net != &init_net) |