BIT-1544: allow NULs in file analysis handles

This commit is contained in:
Jon Siwek 2018-08-15 18:01:56 -05:00
parent f336c8c710
commit 05b10fe2e7
5 changed files with 22 additions and 5 deletions

View file

@ -104,7 +104,16 @@ void Manager::SetHandle(const string& handle)
if ( handle.empty() )
return;
DBG_LOG(DBG_FILE_ANALYSIS, "Set current handle to %s", handle.c_str());
#ifdef DEBUG
if ( debug_logger.IsEnabled(DBG_FILE_ANALYSIS) )
{
BroString tmp{handle};
auto rendered = tmp.Render();
DBG_LOG(DBG_FILE_ANALYSIS, "Set current handle to %s", rendered);
delete [] rendered;
}
#endif
current_file_id = HashHandle(handle);
}