]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1400 in SNORT/snort3 from fix_static_analyzer_issue to master
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Wed, 24 Oct 2018 17:58:21 +0000 (13:58 -0400)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Wed, 24 Oct 2018 17:58:21 +0000 (13:58 -0400)
Squashed commit of the following:

commit 604156554b3de3c7c92bf98e0fe69212fdb3b566
Author: Devendra Dahiphale <ddahipha@cisco.com>
Date:   Wed Oct 24 10:31:36 2018 -0400

    snort2lua: Avoid returning reference of local variable

tools/snort2lua/data/dt_rule_api.cc

index 8a06afba5d387abce2aa973228e68ee83344d58a..e8bf89967bcc5478f8791f5892078d2953a6e5b9 100644 (file)
@@ -162,9 +162,8 @@ void RuleApi::add_hdr_data(const std::string& data)
 
 std::string& RuleApi::get_rule_old_action()
 {
-    std::string res = "";
     if (!curr_rule)
-        return res;
+        begin_rule();
 
     return (curr_rule->get_rule_old_action());
 }