From: Philippe Antoine Date: Fri, 31 Mar 2023 18:06:13 +0000 (+0200) Subject: http: fix multipart completion X-Git-Tag: suricata-7.0.0-rc2~451 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8682%2Fhead;p=thirdparty%2Fsuricata.git http: fix multipart completion As brought by commit 578f328e06b3e03f3bdbbf852b5d121e20849b8b Ticket: #5952 --- 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; }