-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access beyond variable bounds #49
Comments
If the code has a bug the could you please reproduce it? |
With the following patch, the new test fails in the added assertion, which means that there is a buffer overflow. The message is: assertion failed at ... in radix_node_t *radix_search_worst2(radix_tree_t *, prefix_t *, int): (node)->bit < 128
|
I don't fully understand all the logic, but a patch like this one should prevent accessing beyond the prefix->add variable:
|
Hi! Looks like
BIT_TEST_SEARCH
tests bit beyondprefix.add
in the macro. Becausenobe->bit
can be 128 for IPv6 (or 32 for IPv4), but valid index range forprefix.add
is [0, 127] (or [0, 31]).The text was updated successfully, but these errors were encountered: