mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Fix null pointer deref in AST traversal
Specifically in the case where parsing bro scripts had failed.
This commit is contained in:
parent
2470954795
commit
e93c638f8d
3 changed files with 11 additions and 1 deletions
|
@ -9,6 +9,10 @@ TraversalCode traverse_all(TraversalCallback* cb)
|
|||
if ( ! global_scope() )
|
||||
return TC_CONTINUE;
|
||||
|
||||
if ( ! stmts )
|
||||
// May be null when parsing fails.
|
||||
return TC_CONTINUE;
|
||||
|
||||
cb->current_scope = global_scope();
|
||||
|
||||
TraversalCode tc = global_scope()->Traverse(cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue