The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=88f557a2a9c31aaa954841b06d38eec84a1702fc
commit 88f557a2a9c31aaa954841b06d38eec84a1702fc Author: Kristof Provost <[email protected]> AuthorDate: 2024-03-22 03:21:50 +0000 Commit: Kristof Provost <[email protected]> CommitDate: 2024-03-22 08:00:05 +0000 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 --- lib/libpfctl/libpfctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e732c8eef854..076cfd3400e6 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -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); }
