Fix global opaque val segfault, addresses BIT-1071

The opaque types need to be created before scripts are parsed.
This commit is contained in:
Jon Siwek 2013-08-29 17:17:40 -05:00
parent 742a047a40
commit dc2e3d6e04
6 changed files with 34 additions and 22 deletions

View file

@ -242,13 +242,6 @@ StringVal* global_hash_seed;
bro_uint_t bits_per_uid;
OpaqueType* md5_type;
OpaqueType* sha1_type;
OpaqueType* sha256_type;
OpaqueType* entropy_type;
OpaqueType* topk_type;
OpaqueType* bloomfilter_type;
#include "const.bif.netvar_def"
#include "types.bif.netvar_def"
#include "event.bif.netvar_def"
@ -312,13 +305,6 @@ void init_general_global_var()
global_hash_seed = opt_internal_string("global_hash_seed");
bits_per_uid = opt_internal_unsigned("bits_per_uid");
md5_type = new OpaqueType("md5");
sha1_type = new OpaqueType("sha1");
sha256_type = new OpaqueType("sha256");
entropy_type = new OpaqueType("entropy");
topk_type = new OpaqueType("topk");
bloomfilter_type = new OpaqueType("bloomfilter");
}
void init_net_var()