diff options
author | Ishan Mittal <imittal@nvidia.com> | 2014-06-05 13:31:21 +0530 |
---|---|---|
committer | Ishan Mittal <imittal@nvidia.com> | 2014-06-05 13:37:37 +0530 |
commit | dce68ca8e1015cf5bcd33284c0c1c9191e79885d (patch) | |
tree | 7fed5c66956b9ffeadac67750aa042fc9b70f1a1 /net/socket.c | |
parent | 60ca8709496cbcfe7dc931a2ec8786f82b2761eb (diff) | |
parent | be67db109090b17b56eb8eb2190cd70700f107aa (diff) |
Merge branch 'linux-3.10.40' into rel-21
Bug 200004122
Conflicts:
drivers/cpufreq/cpufreq.c
drivers/regulator/core.c
sound/soc/codecs/max98090.c
Change-Id: I9418a05ad5c56b2e902249218bac2fa594d99f56
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 6b315a8cd0c9..e85c4ec47a13 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1969,6 +1969,10 @@ static int copy_msghdr_from_user(struct msghdr *kmsg, { if (copy_from_user(kmsg, umsg, sizeof(struct msghdr))) return -EFAULT; + + if (kmsg->msg_namelen < 0) + return -EINVAL; + if (kmsg->msg_namelen > sizeof(struct sockaddr_storage)) kmsg->msg_namelen = sizeof(struct sockaddr_storage); return 0; |