libpfctl: fix incorrect labels copy
We copied the entire parsed_labels struct, including the counter to a field that was only big enough for the labels (so not the counter). PR: 277875 MFC after: 1 week
This commit is contained in:
@@ -1297,7 +1297,7 @@ snl_attr_get_nested_pf_rule_labels(struct snl_state *ss, struct nlattr *nla,
|
||||
if (! error)
|
||||
return (error);
|
||||
|
||||
memcpy(target, parsed_labels.labels, sizeof(parsed_labels));
|
||||
memcpy(target, parsed_labels.labels, sizeof(parsed_labels.labels));
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user