projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
net
/
socket.c
diff --git
a/net/socket.c
b/net/socket.c
index 2e2586e2dee19184e07e01c528563c7000cf912e..4cdbc107606f037c6404f9947beb80174b961e80 100644
(file)
--- a/
net/socket.c
+++ b/
net/socket.c
@@
-1996,6
+1996,9
@@
static int copy_msghdr_from_user(struct msghdr *kmsg,
if (copy_from_user(kmsg, umsg, sizeof(struct msghdr)))
return -EFAULT;
+ if (kmsg->msg_name == NULL)
+ kmsg->msg_namelen = 0;
+
if (kmsg->msg_namelen < 0)
return -EINVAL;