From: Tom Peters (thopeter) Date: Tue, 18 Dec 2018 21:43:52 +0000 (-0500) Subject: Merge pull request #1468 in SNORT/snort3 from ~SMINUT/snort3:http_malware to master X-Git-Tag: 3.0.0-251~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aa36859478cb47f5211485398d8d5a4f1ef4202;p=thirdparty%2Fsnort3.git Merge pull request #1468 in SNORT/snort3 from ~SMINUT/snort3:http_malware to master Squashed commit of the following: commit 4078b6ab63ded28e096cf582027f9829b6d01de1 Author: Silviu Minut Date: Wed Dec 12 15:30:04 2018 -0500 file_api: call FileContext::set_file_name() from FileFlows::set_file_name with fname = nullptr, in order to generate file event. --- diff --git a/src/file_api/file_flows.cc b/src/file_api/file_flows.cc index a380e15ce..d6392e861 100644 --- a/src/file_api/file_flows.cc +++ b/src/file_api/file_flows.cc @@ -254,9 +254,7 @@ void FileFlows::set_file_name(const uint8_t* fname, uint32_t name_size) if ( !context->is_file_name_set() ) { - if (fname and name_size) - context->set_file_name((const char*)fname, name_size); - + context->set_file_name((const char*)fname, name_size); context->log_file_event(flow, file_policy); } } @@ -348,4 +346,3 @@ static const InspectApi file_inspect_api = }; const BaseApi* sin_file_flow = &file_inspect_api.base; -