From 1ce0e303e79c051af8d72b4f48ec4d464a179f86 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 --- 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 c13a80bb60..0aa9b122b1 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -640,8 +640,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; } @@ -663,12 +662,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); }