mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
pf: fix overly large memcpy()
We only want to copy the labels array, we don't want to copy the counter as well. Reported by: CheriBSD Event: Kitchener-Waterloo Hackathon 202406
This commit is contained in:
parent
4779b16fa6
commit
84ff9e9122
|
@ -532,7 +532,7 @@ nlattr_get_nested_pf_rule_labels(struct nlattr *nla, struct nl_pstate *npt, cons
|
|||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
memcpy(target, parsed_labels.labels, sizeof(parsed_labels));
|
||||
memcpy(target, parsed_labels.labels, sizeof(parsed_labels.labels));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue