From caf9940fd10f474bcbc7bf983e3849a83a8c7562 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Fri, 31 Mar 2023 20:06:13 +0200 Subject: [PATCH] http: fix multipart completion As brought by commit 578f328e06b3e03f3bdbbf852b5d121e20849b8b Ticket: #5952 --- src/app-layer-htp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 7855fb806d..f750d61d4e 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -1449,7 +1449,7 @@ static int HtpRequestBodyHandleMultipart(HtpState *hstate, HtpTxUserData *htud, for (; filedata_len < chunks_buffer_len; filedata_len++) { // take as much as we can until the beginning of a new line if (chunks_buffer[filedata_len] == '\r') { - if (filedata_len + 1 == expected_boundary_len || + if (filedata_len + 1 == chunks_buffer_len || chunks_buffer[filedata_len + 1] == '\n') { break; } -- 2.47.2