"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/service_inspectors/http_inspect/http_flow_data.cc" between
snort3-3.1.29.0.tar.gz and snort3-3.1.30.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

http_flow_data.cc  (snort3-3.1.29.0):http_flow_data.cc  (snort3-3.1.30.0)
skipping to change at line 243 skipping to change at line 243
void HttpFlowData::reset_js_ident_ctx() void HttpFlowData::reset_js_ident_ctx()
{ {
if (js_ident_ctx) if (js_ident_ctx)
{ {
js_ident_ctx->reset(); js_ident_ctx->reset();
debug_log(4, http_trace, TRACE_JS_PROC, nullptr, debug_log(4, http_trace, TRACE_JS_PROC, nullptr,
"js_ident_ctx reset\n"); "js_ident_ctx reset\n");
} }
} }
snort::JSNormalizer& HttpFlowData::acquire_js_ctx(int32_t ident_depth, size_t no snort::JSNormalizer& HttpFlowData::acquire_js_ctx(const HttpParaList::JsNormPara
rm_depth, m& js_norm_param)
uint8_t max_template_nesting, uint32_t max_bracket_depth, uint32_t max_scope
_depth,
const std::unordered_set<std::string>& ignored_ids)
{ {
if (js_normalizer) if (js_normalizer)
return *js_normalizer; return *js_normalizer;
if (!js_ident_ctx) if (!js_ident_ctx)
{ {
js_ident_ctx = new JSIdentifierCtx(ident_depth, max_scope_depth, ignored js_ident_ctx = new JSIdentifierCtx(js_norm_param.js_identifier_depth,
_ids); js_norm_param.max_scope_depth, js_norm_param.ignored_ids, js_norm_pa
ram.ignored_props);
debug_logf(4, http_trace, TRACE_JS_PROC, nullptr, debug_logf(4, http_trace, TRACE_JS_PROC, nullptr,
"js_ident_ctx created (ident_depth %d)\n", ident_depth); "js_ident_ctx created (ident_depth %d)\n", js_norm_param.js_identifi er_depth);
} }
js_normalizer = new JSNormalizer(*js_ident_ctx, norm_depth, js_normalizer = new JSNormalizer(*js_ident_ctx, js_norm_param.js_norm_bytes_
max_template_nesting, max_bracket_depth); depth,
js_norm_param.max_template_nesting, js_norm_param.max_bracket_depth);
debug_logf(4, http_trace, TRACE_JS_PROC, nullptr, debug_logf(4, http_trace, TRACE_JS_PROC, nullptr,
"js_normalizer created (norm_depth %zd, max_template_nesting %d)\n", "js_normalizer created (norm_depth %zd, max_template_nesting %d)\n",
norm_depth, max_template_nesting); js_norm_param.js_norm_bytes_depth, js_norm_param.max_template_nesting);
return *js_normalizer; return *js_normalizer;
} }
bool HttpFlowData::is_pdu_missed() bool HttpFlowData::is_pdu_missed()
{ {
bool pdu_missed = ((pdu_idx - js_pdu_idx) > 1); bool pdu_missed = ((pdu_idx - js_pdu_idx) > 1);
js_pdu_idx = pdu_idx; js_pdu_idx = pdu_idx;
return pdu_missed; return pdu_missed;
} }
skipping to change at line 290 skipping to change at line 289
return; return;
delete js_normalizer; delete js_normalizer;
js_normalizer = nullptr; js_normalizer = nullptr;
debug_log(4, http_trace, TRACE_JS_PROC, nullptr, debug_log(4, http_trace, TRACE_JS_PROC, nullptr,
"js_normalizer deleted\n"); "js_normalizer deleted\n");
} }
#else #else
void HttpFlowData::reset_js_ident_ctx() {} void HttpFlowData::reset_js_ident_ctx() {}
snort::JSNormalizer& HttpFlowData::acquire_js_ctx(int32_t, size_t, uint8_t, uint snort::JSNormalizer& HttpFlowData::acquire_js_ctx(const HttpParaList::JsNormPara
32_t, uint32_t, m&)
const std::unordered_set<std::string>&)
{ return *js_normalizer; } { return *js_normalizer; }
void HttpFlowData::release_js_ctx() {} void HttpFlowData::release_js_ctx() {}
#endif #endif
bool HttpFlowData::add_to_pipeline(HttpTransaction* latest) bool HttpFlowData::add_to_pipeline(HttpTransaction* latest)
{ {
if (pipeline == nullptr) if (pipeline == nullptr)
{ {
pipeline = new HttpTransaction*[MAX_PIPELINE]; pipeline = new HttpTransaction*[MAX_PIPELINE];
HttpModule::increment_peg_counts(PEG_PIPELINED_FLOWS); HttpModule::increment_peg_counts(PEG_PIPELINED_FLOWS);
 End of changes. 6 change blocks. 
14 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)