summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2014-12-06 15:14:58 +0100
committerWilly Tarreau <w@1wt.eu>2014-12-13 15:16:06 +0100
commit25761523045b78fec26626d85ae44539538bbc6c (patch)
tree7be83a28e0b6dfbc66c211034e8212a88bec2698
parent0a10a456df5b5a8d3d62c89eeeb7b59ed7fea5fa (diff)
net: sendmsg: fix failed backport of "fix NULL pointer dereference"
Luis Henriques reported that while backporting commit 40eea80 ("net: sendmsg: fix NULL pointer dereference") and applying the diff by hand, I made a typo resulting in the same test being done twice, and msg_name not being tested. This fixes cf90357 ("net: sendmsg: fix NULL pointer dereference") which was merged into 2.6.32.64. Cc: Andrey Ryabinin <a.ryabinin@samsung.com> Cc: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r--net/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/compat.c b/net/compat.c
index 71ed8393d884..a5848acc1738 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -83,7 +83,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
{
int tot_len;
- if (kern_msg->msg_namelen && kern_msg->msg_namelen) {
+ if (kern_msg->msg_name && kern_msg->msg_namelen) {
if (mode==VERIFY_READ) {
int err = move_addr_to_kernel(kern_msg->msg_name,
kern_msg->msg_namelen,