mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Catch invalid values of the false-positive rate.
This commit is contained in:
parent
012e09c5c4
commit
f211b856c9
1 changed files with 5 additions and 0 deletions
|
@ -5751,6 +5751,11 @@ function anonymize_addr%(a: addr, cl: IPAddrAnonymizationClass%): addr
|
|||
function bloomfilter_init%(fp: double, capacity: count,
|
||||
max: count &default=1%): opaque of bloomfilter
|
||||
%{
|
||||
if ( fp < 0.0 || fp > 1.0 )
|
||||
{
|
||||
reporter->Error("false-positive rate must take value between 0 and 1");
|
||||
return NULL;
|
||||
}
|
||||
BloomFilter* bf;
|
||||
if ( max == 1 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue