protection from bad frees on unallocated strings

This commit is contained in:
Julien Sentier 2012-02-23 12:48:28 +01:00 committed by Robin Sommer
parent 2eeac54857
commit c2ee15b09f
2 changed files with 4 additions and 4 deletions

View file

@ -85,8 +85,8 @@ void BroDoc::AddImport(const std::string& s)
if ( ext_pos != std::string::npos )
lname = lname.substr(0, ext_pos);
const char* full_filename = "<error>";
const char* subpath = "<error>";
const char* full_filename = NULL;
const char* subpath = NULL;
FILE* f = search_for_file(lname.c_str(), "bro", &full_filename, true,
&subpath);