Fix segfault when an existing enum identifier is added again with a

different value.

Addresses BIT-931.

Also switching the internal enum ID map to storing std::string for
easier memory management.
This commit is contained in:
Robin Sommer 2016-07-05 16:35:53 -07:00
parent 721693425f
commit ca3f7eadbe
5 changed files with 35 additions and 20 deletions

View file

@ -584,7 +584,7 @@ protected:
const char* name, bro_int_t val, bool is_export,
bool deprecated);
typedef std::map< const char*, bro_int_t, ltstr > NameMap;
typedef std::map<std::string, bro_int_t> NameMap;
NameMap names;
// The counter is initialized to 0 and incremented on every implicit