Skip to content

Commit

Permalink
ipc_us: clear request unused fields
Browse files Browse the repository at this point in the history
Clear unused request fields and padding so that valgrind doesn't complain
about undefined data being sent over the socket.
  • Loading branch information
Jeremy Fitzhardinge committed Sep 6, 2012
1 parent 951c982 commit b79f8ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ipc_us.c
Expand Up @@ -413,6 +413,7 @@ qb_ipcc_us_setup_connect(struct qb_ipcc_connection *c,
return res;
}

memset(&request, 0, sizeof(request));
request.hdr.id = QB_IPC_MSG_AUTHENTICATE;
request.hdr.size = sizeof(request);
request.max_msg_size = c->setup.max_msg_size;
Expand Down Expand Up @@ -492,6 +493,7 @@ qb_ipcc_us_connect(struct qb_ipcc_connection *c,
goto cleanup_hdr;
}

memset(&request, 0, sizeof(request));
request.hdr.id = QB_IPC_MSG_NEW_EVENT_SOCK;
request.hdr.size = sizeof(request);
request.connection = r->connection;
Expand Down

0 comments on commit b79f8ce

Please sign in to comment.