From: Bhagya Tholpady (bbantwal) Date: Thu, 18 Mar 2021 15:05:50 +0000 (+0000) Subject: Merge pull request #2788 in SNORT/snort3 from ~DKYRYLOV/snort3:dump_rule_meta_crash... X-Git-Tag: 3.1.3.0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fb7cf1dfe52c436bca3cb1489aa811f62333f73;p=thirdparty%2Fsnort3.git Merge pull request #2788 in SNORT/snort3 from ~DKYRYLOV/snort3:dump_rule_meta_crash to master Squashed commit of the following: commit 01f2233993c744d01935e1fbe9a727555867ad8f Author: dkyry Date: Wed Mar 10 14:07:21 2021 +0200 detection: Update dump_rule_meta function to only print rules from default ips policy --- diff --git a/src/detection/signature.cc b/src/detection/signature.cc index 6bd857e3a..978672e6b 100644 --- a/src/detection/signature.cc +++ b/src/detection/signature.cc @@ -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);