mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Fix crash when printing type of recursive structures.
Also slightly fix indentation in Type.h
This commit is contained in:
parent
13c4489578
commit
c5a14d1bc1
6 changed files with 50 additions and 6 deletions
|
@ -23,6 +23,7 @@ typedef enum {
|
|||
class BroFile;
|
||||
class IPAddr;
|
||||
class IPPrefix;
|
||||
class BroType;
|
||||
|
||||
class ODesc {
|
||||
public:
|
||||
|
@ -140,6 +141,12 @@ public:
|
|||
|
||||
void Clear();
|
||||
|
||||
// Used to determine recursive types. Records push their types on here;
|
||||
// if the same type (by address) is re-encountered, processing aborts.
|
||||
bool PushType(const BroType* type);
|
||||
bool PopType(const BroType* type);
|
||||
bool FindType(const BroType* type);
|
||||
|
||||
protected:
|
||||
void Indent();
|
||||
|
||||
|
@ -190,6 +197,8 @@ protected:
|
|||
int do_flush;
|
||||
int include_stats;
|
||||
int indent_with_spaces;
|
||||
|
||||
std::set<const BroType*> encountered_types;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue