]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1468 in SNORT/snort3 from ~SMINUT/snort3:http_malware to master
authorTom Peters (thopeter) <thopeter@cisco.com>
Tue, 18 Dec 2018 21:43:52 +0000 (16:43 -0500)
committerTom Peters (thopeter) <thopeter@cisco.com>
Tue, 18 Dec 2018 21:43:52 +0000 (16:43 -0500)
Squashed commit of the following:

commit 4078b6ab63ded28e096cf582027f9829b6d01de1
Author: Silviu Minut <sminut@cisco.com>
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.

src/file_api/file_flows.cc

index a380e15ce3b2ffd644ac5eba313789070aef8567..d6392e8611d62dbf6aec50d01fa2d7a0e3957ae6 100644 (file)
@@ -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;
-