summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-08-01 04:54:15 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-08-01 04:54:15 -0700
commiteea1a6272756d3f80ca4abc7b12a2cc82279063d (patch)
treea0135eacc4381121d4cfa1645911698ce5de53f1
parent414b079b7f4ba955f4679cd87be64199b4e875c7 (diff)
parent596aa5c28ae21cda5b813c09093003ab137b33ef (diff)
Merge "net: ipc_router: Initialize the sockaddr in recvmsg() handler"
-rw-r--r--net/ipc_router/ipc_router_socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipc_router/ipc_router_socket.c b/net/ipc_router/ipc_router_socket.c
index 23e4443fc1b2..7c82f7ff8874 100644
--- a/net/ipc_router/ipc_router_socket.c
+++ b/net/ipc_router/ipc_router_socket.c
@@ -143,6 +143,7 @@ static int msm_ipc_router_extract_msg(struct msghdr *m,
return -EINVAL;
}
ctl_msg = (union rr_control_msg *)(temp->data);
+ memset(addr, 0x0, sizeof(*addr));
addr->family = AF_MSM_IPC;
addr->address.addrtype = MSM_IPC_ADDR_ID;
addr->address.addr.port_addr.node_id = ctl_msg->cli.node_id;
@@ -151,6 +152,7 @@ static int msm_ipc_router_extract_msg(struct msghdr *m,
return offset;
}
if (addr && (hdr->type == IPC_ROUTER_CTRL_CMD_DATA)) {
+ memset(addr, 0x0, sizeof(*addr));
addr->family = AF_MSM_IPC;
addr->address.addrtype = MSM_IPC_ADDR_ID;
addr->address.addr.port_addr.node_id = hdr->src_node_id;