mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Merge remote-tracking branch 'origin/fastpath'
Slightly adapted after discussing with Bernhard. I also added one further check. * origin/fastpath: fix segfault that could be caused by merging an empty bloom-filter with a bloom-filter already containing values.
This commit is contained in:
commit
86dcea3b35
6 changed files with 19 additions and 4 deletions
|
@ -186,7 +186,9 @@ function bloomfilter_merge%(bf1: opaque of bloomfilter,
|
|||
const BloomFilterVal* bfv1 = static_cast<const BloomFilterVal*>(bf1);
|
||||
const BloomFilterVal* bfv2 = static_cast<const BloomFilterVal*>(bf2);
|
||||
|
||||
if ( ! same_type(bfv1->Type(), bfv2->Type()) )
|
||||
if ( bfv1->Type() && // any one 0 is ok here
|
||||
bfv2->Type() &&
|
||||
! same_type(bfv1->Type(), bfv2->Type()) )
|
||||
{
|
||||
reporter->Error("incompatible Bloom filter types");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue