mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
openvswitch: Use nla_memcpy() to memcpy() data from attributes
Less error prone as it takes into account the length of both the destination buffer and the source attribute and documents when data is copied from an attribute. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
parent
dded45fc17
commit
32686a9d29
2 changed files with 2 additions and 2 deletions
|
@ -211,7 +211,7 @@ struct sw_flow_actions *ovs_flow_actions_alloc(const struct nlattr *actions)
|
|||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
sfa->actions_len = actions_len;
|
||||
memcpy(sfa->actions, nla_data(actions), actions_len);
|
||||
nla_memcpy(sfa->actions, actions, actions_len);
|
||||
return sfa;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue