]> git.ipfire.org Git - thirdparty/iptables.git/commit
libxtables: Promote xtopt_esize_by_type() as xtopt_psize getter
authorPhil Sutter <phil@nwl.cc>
Wed, 14 May 2025 17:36:01 +0000 (19:36 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 22 Jul 2025 08:34:19 +0000 (10:34 +0200)
commit786b75f7c9b9feaa294da097c2e9727747162c79
tree987b8637acd78d7b6770b63220d84890eecb4279
parentd33c6ad308cf7b9f627aeed48a5163c0374b5035
libxtables: Promote xtopt_esize_by_type() as xtopt_psize getter

Apart from supporting range-types, this getter is convenient to sanitize
array out of bounds access. Use it in xtables_option_metavalidate() to
simplify the code a bit.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Florian Westphal <fw@strlen.de>
libxtables/xtoptions.c