mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
connector: use 'size' everywhere in cn_netlink_send()
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 <minipli@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
162b2bedc0
commit
ac73bf50b7
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user