You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a specific data set, the art_iter_prefix find a full_match and goes deeper of the key_len.
// Bail if the prefix does not match
if (n->partial_len) {
[...]
// if there is a full match, go deeper
depth = depth + n->partial_len;
}
[...]
child = find_child(n, key[depth]); //KABOOUM when key_len is less than the depth
Simply change? :
// If we've matched the prefix, iterate on this node
if (prefix_len && ((depth + prefix_len) == key_len)) {
return recursive_iter(n, cb, data);
// If mismatch or no match, search is terminated
} else if(prefix_len < n->partial_len) {
return 0;
}
Not 100% sure is the optimal solution.
The text was updated successfully, but these errors were encountered:
With a specific data set, the art_iter_prefix find a full_match and goes deeper of the key_len.
// Bail if the prefix does not match
if (n->partial_len) {
[...]
// if there is a full match, go deeper
depth = depth + n->partial_len;
}
[...]
child = find_child(n, key[depth]); //KABOOUM when key_len is less than the depth
Simply change? :
Not 100% sure is the optimal solution.
The text was updated successfully, but these errors were encountered: