]> git.ipfire.org Git - thirdparty/bird.git/commit
Hash: fix buffer overflow in unit test
authorIgor Putovny <igor.putovny@nic.cz>
Wed, 11 Jun 2025 10:00:23 +0000 (12:00 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 22 Sep 2025 11:35:02 +0000 (13:35 +0200)
commitb62dfc864daa04891dbbeac9e13fad0bbc5ab782
treee7e97c966b14fc16543746080d21d4c855703bff
parente931e6d681426e861b3f24f7f0c607c528264b69
Hash: fix buffer overflow in unit test

This bug manifested itself as segmentation fault of t_insert2_find test when
TEST_ORDER was increased from 13 to 14. When checking the validity of filled
table, the table is iterated from 0 to MAX_NUM. However, when order is an even
number, the size of the table is lower than MAX_NUM (due to table resizing),
which caused reading beyond the allocated memory.

This bug does not apply to BIRD itself.
lib/hash_test.c