From 6ef9423f3cff13e6c73f97eb6a3a27d6f64cc320 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Mon, 17 Oct 2022 15:47:49 +0200 Subject: [PATCH] analyzer/HTTP: Call TCP_ApplicationAnalyzer::Done() after RequestMade()/ReplyMade() --- src/analyzer/protocol/http/HTTP.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/analyzer/protocol/http/HTTP.cc b/src/analyzer/protocol/http/HTTP.cc index 96f275176c..f480b3f992 100644 --- a/src/analyzer/protocol/http/HTTP.cc +++ b/src/analyzer/protocol/http/HTTP.cc @@ -849,11 +849,15 @@ void HTTP_Analyzer::Done() if ( IsFinished() ) return; - analyzer::tcp::TCP_ApplicationAnalyzer::Done(); - RequestMade(true, "message interrupted when connection done"); ReplyMade(true, "message interrupted when connection done"); + // Call Done() on support and child analyzers only after RequestMade() + // and ReplyMade() completed. These methods may interact with the analyzer's + // child analyzers (specifically through HTTP_Entity's EndOfData() and + // ForwardEndOfData()) which isn't valid after a call to Done(). + analyzer::tcp::TCP_ApplicationAnalyzer::Done(); + delete request_message; request_message = nullptr;