mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Fix unlikely null ptr deref in broxygen::Manager.
This commit is contained in:
parent
be05d7b435
commit
d3e908af3b
1 changed files with 2 additions and 1 deletions
|
@ -35,7 +35,8 @@ Manager::Manager(const string& arg_config, const string& bro_command)
|
||||||
if ( getenv("BRO_DISABLE_BROXYGEN") )
|
if ( getenv("BRO_DISABLE_BROXYGEN") )
|
||||||
disabled = true;
|
disabled = true;
|
||||||
|
|
||||||
string path_to_bro = find_file(bro_command, getenv("PATH"));
|
const char* path = getenv("PATH");
|
||||||
|
string path_to_bro = path ? find_file(bro_command, path): "";
|
||||||
struct stat s;
|
struct stat s;
|
||||||
|
|
||||||
if ( path_to_bro.empty() || stat(path_to_bro.c_str(), &s) < 0 )
|
if ( path_to_bro.empty() || stat(path_to_bro.c_str(), &s) < 0 )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue