[BUG] ebtree: string_equal_bits() could return garbage on identical strings
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Sep 2010 09:28:19 +0000 (11:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Oct 2010 17:04:30 +0000 (19:04 +0200)
commita97e73a0a143e25a5f70d43e5b0bd57c4dfb6764
tree6f46223d121126df7ffe2232dc2753a95ad0f2b1
parenta56235c5d35892aae50112f6707af43ed539aaa7
[BUG] ebtree: string_equal_bits() could return garbage on identical strings

(from ebtree 6.0.2)

When inserting duplicates on x86/x86_64, the assembler optimization
does not support equal strings that both end up with a zero, and
can return garbage in the bit number, possibly causing a segfault
for its users. The only case where this can happen appears to be
in ebst_insert().
(cherry picked from commit 006152c62ae56d151188626e6074a79be3928858)
ebtree/ebtree.h