Commit 25761523 authored by Willy Tarreau's avatar Willy Tarreau

net: sendmsg: fix failed backport of "fix NULL pointer dereference"

Luis Henriques reported that while backporting commit 40eea803 ("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 cf903573 ("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: default avatarWilly Tarreau <w@1wt.eu>
parent 0a10a456
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment