mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/coverity-1443771'
* origin/topic/jsiwek/coverity-1443771: Guard against nullptr deref after AST-reduction consistency checks
This commit is contained in:
commit
042a1ca9d6
1 changed files with 9 additions and 2 deletions
|
@ -56,9 +56,16 @@ void optimize_func(ScriptFunc* f, ProfileFunc* pf, ScopePtr scope_ptr,
|
||||||
|
|
||||||
non_reduced_perp = nullptr;
|
non_reduced_perp = nullptr;
|
||||||
checking_reduction = true;
|
checking_reduction = true;
|
||||||
|
|
||||||
if ( ! new_body->IsReduced(rc) )
|
if ( ! new_body->IsReduced(rc) )
|
||||||
printf("Reduction inconsistency for %s: %s\n", f->Name(),
|
{
|
||||||
obj_desc(non_reduced_perp).c_str());
|
if ( non_reduced_perp )
|
||||||
|
printf("Reduction inconsistency for %s: %s\n", f->Name(),
|
||||||
|
obj_desc(non_reduced_perp).c_str());
|
||||||
|
else
|
||||||
|
printf("Reduction inconsistency for %s\n", f->Name());
|
||||||
|
}
|
||||||
|
|
||||||
checking_reduction = false;
|
checking_reduction = false;
|
||||||
|
|
||||||
if ( analysis_options.only_func || analysis_options.dump_xform )
|
if ( analysis_options.only_func || analysis_options.dump_xform )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue