diff options
author | Thomas Haller <thaller@redhat.com> | 2023-11-08 19:22:20 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-11-21 15:55:56 +0100 |
commit | ee54e5fe938f809ab99f4343f0f7dc1199204e46 (patch) | |
tree | d86c5b6aea06c022166a6d1a2b3789f3328cbf8a | |
parent | 80fa13842f04db0ecbf7730b9c9d2d7179773f78 (diff) |
netlink: fix buffer size for user data in netlink_delinearize_chain()
commit 505a6794422238f9f1d590fe8c1ee3ea7fd46579 upstream.
The correct define is NFTNL_UDATA_CHAIN_MAX and not NFTNL_UDATA_OBJ_MAX.
In current libnftnl, they both are defined as 1, so (with current libnftnl)
there is no difference.
Fixes: 702ac2b72c0e ("src: add comment support for chains")
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | src/netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c index 8d517c10..4d7c7458 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -617,7 +617,7 @@ static int qsort_device_cmp(const void *a, const void *b) struct chain *netlink_delinearize_chain(struct netlink_ctx *ctx, const struct nftnl_chain *nlc) { - const struct nftnl_udata *ud[NFTNL_UDATA_OBJ_MAX + 1] = {}; + const struct nftnl_udata *ud[NFTNL_UDATA_CHAIN_MAX + 1] = {}; int priority, policy, len = 0, i; const char * const *dev_array; struct chain *chain; |