FastFilter / fastfilter_java

Fast Approximate Membership Filters (Java)
Apache License 2.0
238 stars 27 forks source link

Usage of uninitialized array in the constructor #37

Closed miroslavp closed 11 months ago

miroslavp commented 11 months ago

https://github.com/FastFilter/fastfilter_java/blob/ee55724126bae6aa70498125044cb8f79c371bc7/fastfilter/src/main/java/org/fastfilter/xor/Xor16.java#L55-L62

I'm not a java developer, but I believe this will always crash the system as the fingerprints array is initialized at the end of the constructor. The same stands for the Xor8 implementation.

lemire commented 11 months ago

Sure, good point. Fixed in main branch.