]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2788 in SNORT/snort3 from ~DKYRYLOV/snort3:dump_rule_meta_crash...
authorBhagya Tholpady (bbantwal) <bbantwal@cisco.com>
Thu, 18 Mar 2021 15:05:50 +0000 (15:05 +0000)
committerBhagya Tholpady (bbantwal) <bbantwal@cisco.com>
Thu, 18 Mar 2021 15:05:50 +0000 (15:05 +0000)
Squashed commit of the following:

commit 01f2233993c744d01935e1fbe9a727555867ad8f
Author: dkyry <dkyrylov@cisco.com>
Date:   Wed Mar 10 14:07:21 2021 +0200

    detection: Update dump_rule_meta function to only print rules from default ips policy

src/detection/signature.cc

index 6bd857e3a6ff77514053e1fc033f82a32b68b687..978672e6b622f360c5176009f85bb5c853072012 100644 (file)
@@ -417,8 +417,13 @@ void dump_rule_meta(const SnortConfig* sc)
         const RuleTreeNode* rtn = otn->proto_nodes[0];
         const SigInfo& si = otn->sigInfo;
 
-        json.open();
+        if ( !rtn )
+        {
+            ghn = sc->otn_map->find_next();
+            continue;
+        }
 
+        json.open();
         dump_sid(json, si);
         dump_header(json, rtn->header);
         dump_info(json, si);