Fix null pointer deref in AST traversal

Specifically in the case where parsing bro scripts had failed.
This commit is contained in:
Jon Siwek 2018-06-22 20:17:06 -05:00
parent 2470954795
commit e93c638f8d
3 changed files with 11 additions and 1 deletions

View file

@ -1,4 +1,10 @@
2.5-681 | 2018-06-22 20:17:06 -0500
* Fix null pointer deref in AST traversal (Corelight)
* Fix for ancient reference-counting bug in NFA.cc (Vern Paxson)
2.5-679 | 2018-06-21 16:00:48 -0500
* Add support for bitwise operations (&, |, ^, ~) on "count" values.

View file

@ -1 +1 @@
2.5-679
2.5-681

View file

@ -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);