git: 75a94658d372 - stable/13 - libpfctl: fix incorrect pcounters array size
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 May 2024 15:43:32 UTC
The branch stable/13 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=75a94658d3724e61f25ec3692d2665fce9ead195
commit 75a94658d3724e61f25ec3692d2665fce9ead195
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-04-26 14:07:38 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-05-13 15:41:05 +0000
libpfctl: fix incorrect pcounters array size
The array is 2 x 2 x 2, not 2 x 2 x 3.
Sponsored by: Rubicon Communications, LLC ("Netgate")
MFC after: 2 weeks
(cherry picked from commit a3f7176523e8611b259cefd7431c01e24f446db7)
---
lib/libpfctl/libpfctl.c | 2 +-
lib/libpfctl/libpfctl.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index be45746368de..f5ddbba79bfd 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -249,7 +249,7 @@ pfctl_get_status(int dev)
_pfctl_get_status_counters(nvlist_get_nvlist(nvl, "scounters"),
&status->scounters);
- pf_nvuint_64_array(nvl, "pcounters", 2 * 2 * 3,
+ pf_nvuint_64_array(nvl, "pcounters", 2 * 2 * 2,
(uint64_t *)status->pcounters, NULL);
pf_nvuint_64_array(nvl, "bcounters", 2 * 2,
(uint64_t *)status->bcounters, NULL);
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index 78d981c2d769..308be03fbd1a 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -60,7 +60,7 @@ struct pfctl_status {
struct pfctl_status_counters lcounters;
struct pfctl_status_counters fcounters;
struct pfctl_status_counters scounters;
- uint64_t pcounters[2][2][3];
+ uint64_t pcounters[2][2][2];
uint64_t bcounters[2][2];
};