diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -152,9 +152,8 @@ size_t elems; tmp = nvlist_get_number_array(nvl, name, &elems); - assert(elems <= maxelems); - for (size_t i = 0; i < elems; i++) + for (size_t i = 0; i < elems && i < maxelems; i++) numbers[i] = tmp[i]; if (nelems)