From a121a01f0ea80a159ae49c12bd027517ee6ffda8 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 25 Aug 2026 09:15:15 +0200 Subject: [PATCH] http1: set all events in a flow Do not put a limit to set only the first 512 events Ticket: 8867 (cherry picked from commit 1ce0e303e79c051af8d72b4f48ec4d464a179f86) --- src/app-layer-htp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 88050bd299..39c55506d1 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -646,8 +646,7 @@ static uint32_t AppLayerHtpComputeChunkLength(uint64_t content_len_so_far, uint3 */ static void HTPHandleError(HtpState *s, const uint8_t dir) { - if (s == NULL || s->conn == NULL || s->htp_messages_count >= HTP_MAX_MESSAGES) { - // ignore further messages + if (s == NULL || s->conn == NULL) { return; } @@ -669,12 +668,9 @@ static void HTPHandleError(HtpState *s, const uint8_t dir) htp_free_cstring(msg); htp_log_free(log); s->htp_messages_count++; - if (s->htp_messages_count >= HTP_MAX_MESSAGES) { + if (s->htp_messages_count == HTP_MAX_MESSAGES) { // only once per HtpState HTPSetEvent(s, NULL, dir, HTTP_DECODER_EVENT_TOO_MANY_WARNINGS); - // too noisy in fuzzing - // DEBUG_VALIDATE_BUG_ON("Too many libhtp messages"); - break; } log = htp_conn_next_log(s->conn); }