diff options
author | Phil Sutter <phil@nwl.cc> | 2021-06-09 15:49:52 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-06-09 19:36:25 +0200 |
commit | baecd1cf26851a4c5b7d469206a488f14fe5b147 (patch) | |
tree | 86f5285c2fd39b5dbc941b489a4f915551b23599 /include | |
parent | 001bd5b1b744428c77c68dd371fed58c3dc511f2 (diff) |
segtree: Fix segfault when restoring a huge interval set
Restoring a set of IPv4 prefixes with about 1.1M elements crashes nft as
set_to_segtree() exhausts the stack. Prevent this by allocating the
pointer array on heap and make sure it is freed before returning to
caller.
With this patch in place, restoring said set succeeds with allocation of
about 3GB of memory, according to valgrind.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions