Merge in SNORT/snort3 from ~SUMIKUM7/snort3:post_porting_760 to master
Squashed commit of the following:
commit
896ce9cb02a539af2297c5bc4207a4879319e844
Author: Sumit Kumar <sumikum7@cisco.com>
Date: Sat Oct 28 10:25:35 2023 +0530
snort3_coverity: coverity errors and cppcheck warnings being fixed here
unsigned i = 0;
#endif
- for ( auto it : store )
+ for ( const auto & it : store )
{
debug_logf(detection_trace, TRACE_RULE_EVAL,
static_cast<snort::IpsContext*>(context)->packet, "Processing pattern match #%d\n", ++i);
void RuleStateMap::apply(SnortConfig* sc)
{
- for ( auto it : map )
+ for ( const auto & it : map )
{
const RuleKey& k = it.first;
OptTreeNode* otn = OtnLookup(sc->otn_map, k.gid, k.sid);
return;
}
- for ( auto ct : classifications )
+ for ( const auto & ct : classifications )
delete ct.second;
- for ( auto rs : references )
+ for ( const auto & rs : references )
delete rs.second;
for ( auto* s : scratchers )
{ return DETECT; }
public:
- RangeCheck version;
- bool any_frag;
- Uuid uuid;
+ RangeCheck version = {};
+ bool any_frag = false;
+ Uuid uuid = {};
};
bool Dce2IfaceModule::begin(const char*, int, SnortConfig*)