Skip to content

Commit

Permalink
connector: use 'size' everywhere in cn_netlink_send()
Browse files Browse the repository at this point in the history
We calculated the size for the netlink message buffer as size. Use size
in the memcpy() call as well instead of recalculating it.

Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
minipli authored and davem330 committed Oct 2, 2013
1 parent 162b2be commit ac73bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/connector/connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask)

data = nlmsg_data(nlh);

memcpy(data, msg, sizeof(*data) + msg->len);
memcpy(data, msg, size);

NETLINK_CB(skb).dst_group = group;

Expand Down

0 comments on commit ac73bf5

Please sign in to comment.