]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
obj: Validate NFTNL_OBJ_TYPE, too
authorPhil Sutter <phil@nwl.cc>
Thu, 14 Mar 2024 16:28:15 +0000 (17:28 +0100)
committerPhil Sutter <phil@nwl.cc>
Wed, 10 Apr 2024 23:27:07 +0000 (01:27 +0200)
Fixes: 5573d0146c1ae ("src: support for stateful objects")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/object.c

index 0814be744448bc894e319ad93d8c74d85a087965..d3bfd16df532e158c7f7e09be039999e8ea7a7b1 100644 (file)
@@ -98,6 +98,7 @@ void nftnl_obj_unset(struct nftnl_obj *obj, uint16_t attr)
 }
 
 static uint32_t nftnl_obj_validate[NFTNL_OBJ_MAX + 1] = {
+       [NFTNL_OBJ_TYPE]        = sizeof(uint32_t),
        [NFTNL_OBJ_FAMILY]      = sizeof(uint32_t),
        [NFTNL_OBJ_USE]         = sizeof(uint32_t),
        [NFTNL_OBJ_HANDLE]      = sizeof(uint64_t),