mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Merge branch 'topic/corelight/eval-condition-crash' of https://github.com/corelight/bro
* 'topic/corelight/eval-condition-crash' of https://github.com/corelight/bro: Fix segmentation fault on eval condition with no return value.
This commit is contained in:
commit
e7d3dd0818
4 changed files with 34 additions and 2 deletions
|
@ -175,8 +175,14 @@ bool RuleConditionEval::DoMatch(Rule* rule, RuleEndpointState* state,
|
|||
try
|
||||
{
|
||||
Val* val = id->ID_Val()->AsFunc()->Call(&args);
|
||||
result = val->AsBool();
|
||||
Unref(val);
|
||||
|
||||
if ( val )
|
||||
{
|
||||
result = val->AsBool();
|
||||
Unref(val);
|
||||
}
|
||||
else
|
||||
result = false;
|
||||
}
|
||||
|
||||
catch ( InterpreterException& e )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue