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:
Robin Sommer 2013-07-31 20:08:28 -07:00
commit 86dcea3b35
6 changed files with 19 additions and 4 deletions

View file

@ -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;