mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 06:15:33 -04:00
pf: fix pf_nv##_array() size check
We want to set the maximum number of elements we'll accept, not the exact number we need. MFC after: 3 weeks Sponsored by: Orange Business Services
This commit is contained in:
parent
0ec220df52
commit
76c8f202a4
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$");
|
|||
if (! nvlist_exists_number_array(nvl, name)) \
|
||||
return (EINVAL); \
|
||||
n = nvlist_get_number_array(nvl, name, &nitems); \
|
||||
if (nitems != maxelems) \
|
||||
if (nitems > maxelems) \
|
||||
return (E2BIG); \
|
||||
if (nelems != NULL) \
|
||||
*nelems = nitems; \
|
||||
|
|
|
|||
Loading…
Reference in a new issue