mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
fixes for doing "script validation" to check for ZAM compile-ability
This commit is contained in:
parent
cae5d30c62
commit
2c5b5bb41f
3 changed files with 20 additions and 12 deletions
|
@ -35,7 +35,8 @@ bool is_ZAM_compilable(const ProfileFunc* pf, const char** reason)
|
|||
}
|
||||
|
||||
auto b = pf->ProfiledBody();
|
||||
if ( b && ! script_is_valid(b) )
|
||||
auto is_hook = pf->ProfiledFunc()->Flavor() == FUNC_FLAVOR_HOOK;
|
||||
if ( b && ! script_is_valid(b, is_hook) )
|
||||
{
|
||||
if ( reason )
|
||||
*reason = "invalid script body";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue