diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-28 01:19:40 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-28 01:19:40 -0700 |
commit | 1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9 (patch) | |
tree | fe3dc41cbb47ae12b7c3faf6a88b097349e50d5a /net/sctp | |
parent | e35c3269edba151e1c703d87068a28ce2cd65bb0 (diff) | |
parent | d420895efb259a78dda50f95289571faa6e10e41 (diff) | |
download | talos-obmc-linux-1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9.tar.gz talos-obmc-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 |