-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bloom filter reader: prevent potential division by zero
It's currently possible to call NewBloomFilterReader() with zero-sized bloom filters. This is bad, because those will cause divisions by zero when we attempt to perform lookups. Let's simply reject all Bloom filters where sizeBits % 8 == 0. BloomFilterComputingUnreadDirectoryMonitor wouldn't emit those anyway, because it tries to make them prime sized.
- Loading branch information
1 parent
d42ff45
commit 88aba65
Showing
2 changed files
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters