summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndy Roulin <andy.roulin@gmail.com>2022-11-23 00:09:14 +0000
committerAndy Roulin <andy.roulin@gmail.com>2022-11-23 17:30:52 +0000
commit8b4688c2a6ed65f383327d7267ffcb60e3205d32 (patch)
tree53bc8533b07e652cd4d24ab8dbe1849498a0d31a /doc
parentcdd8d4e59c8a042f97f3983bfe26ccf4172c1884 (diff)
downloadlibnet-8b4688c2a6ed65f383327d7267ffcb60e3205d32.tar.gz
libnet_if_addr.c: fix segfault when number of IPs > 512
The current code has a hardcoded limit of 512 IP addresses. The static array will be overflowed when more addresses are present. Fix the static limit by using realloc when the array needs to grow to accomodate more interfaces. Growing the array by a factor of 1.5 each time (close to golden ratio) to maximize reuse of previously allocated space.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions