]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2767 in SNORT/snort3 from ~BBANTWAL/snort3:alias_fix to master
authorBhagya Tholpady (bbantwal) <bbantwal@cisco.com>
Thu, 25 Feb 2021 15:44:08 +0000 (15:44 +0000)
committerBhagya Tholpady (bbantwal) <bbantwal@cisco.com>
Thu, 25 Feb 2021 15:44:08 +0000 (15:44 +0000)
Squashed commit of the following:

commit aec73724ee2ba89181730c41662031e90ef4232d
Author: Bhagya Tholpady <bbantwal@cisco.com>
Date:   Wed Feb 24 16:55:10 2021 -0500

    managers: Perform sanity checks on set_alias() parameters

src/managers/module_manager.cc

index fe9542e17a7bcd7224e980616db444f3092a0809..34c1d8ee40e54d39bb0b9e04fa8e6883706988b7 100644 (file)
@@ -640,6 +640,9 @@ SO_PUBLIC void clear_alias()
 
 SO_PUBLIC bool set_alias(const char* from, const char* to)
 {
+    if ( !from or !to )
+        return false;
+
     const Module* m = ModuleManager::get_module(to);
 
     if ( !m or !m->is_bindable() )