diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-28 10:19:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-28 10:19:40 +0200 |
commit | 1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9 (patch) | |
tree | fe3dc41cbb47ae12b7c3faf6a88b097349e50d5a /net/sctp | |
parent | bnx2x: Update version (diff) | |
parent | ipv6 route: Convert rt6_device_match() to use RT6_LOOKUP_F_xxx flags. (diff) | |
download | linux-1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9.tar.xz linux-1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl4965-base.c
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index f98650cc48d8..43460a1cb6d0 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4512,7 +4512,9 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len, if (copy_from_user(&getaddrs, optval, len)) return -EFAULT; - if (getaddrs.addr_num <= 0) return -EINVAL; + if (getaddrs.addr_num <= 0 || + getaddrs.addr_num >= (INT_MAX / sizeof(union sctp_addr))) + return -EINVAL; /* * For UDP-style sockets, id specifies the association to query. * If the id field is set to the value '0' then the locally bound |