[Bro-Commits] [git/bro] topic/matthias/bloom-filter: Fixing for unserializion error. (40201a1)

    Fixing for unserializion error.

Thanks for delving into it!

    Because BloomFilter is a base class, with other classes derived from
    it, it needs special treatment.

I assume this is only necessary when serializing through the base
class? For example, we have another serializable base class HashVal
with derived classes for MD5, SHA1, etc., but never use the class
instances in a polymorphic context. Seems like this class would need a
similar fix if we start using it like Bloom filters.

    Matthias

I assume this is only necessary when serializing through the base
class?

Indeed.

For example, we have another serializable base class HashVal with
derived classes for MD5, SHA1, etc., but never use the class
instances in a polymorphic context.

HashVal is derived from Val, so that should be fine as long as
unserializing is triggered via Val::Unserialize(). A good rule of
thumb for this treatment is base classes that come with their own
Unserialize() method.

Robin