diff options
author | Dan Williams <dan.j.williams@intel.com> | 2010-05-17 16:30:58 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-05-17 16:30:58 -0700 |
commit | 0b28330e39bbe0ffee4c56b09fc415fcec595ea3 (patch) | |
tree | fcf504879883763557e696eff81427b1ab78f76b /net/ieee802154/af_ieee802154.c | |
parent | 058276303dbc4ed089c1f7dad0871810b1f5ddf1 (diff) | |
parent | caa20d974c86af496b419eef70010e63b7fab7ac (diff) |
Merge branch 'ioat' into dmaengine
Diffstat (limited to 'net/ieee802154/af_ieee802154.c')
-rw-r--r-- | net/ieee802154/af_ieee802154.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c index bad1c49fd96..c7da600750b 100644 --- a/net/ieee802154/af_ieee802154.c +++ b/net/ieee802154/af_ieee802154.c @@ -28,6 +28,7 @@ #include <linux/if.h> #include <linux/termios.h> /* For TIOCOUTQ/INQ */ #include <linux/list.h> +#include <linux/slab.h> #include <net/datalink.h> #include <net/psnap.h> #include <net/sock.h> @@ -126,6 +127,9 @@ static int ieee802154_sock_connect(struct socket *sock, struct sockaddr *uaddr, { struct sock *sk = sock->sk; + if (addr_len < sizeof(uaddr->sa_family)) + return -EINVAL; + if (uaddr->sa_family == AF_UNSPEC) return sk->sk_prot->disconnect(sk, flags); |