From fe6950de0871e2445ace11e3d1d6b14939667349 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 19 May 2020 13:59:56 +0200 Subject: [PATCH] http: use more precise parameter in HtpRequestBodySetupMultipart So that we can see that it does not have to handle gaps --- src/app-layer-htp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 9927afb35a..9940c82cbc 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -1158,9 +1158,9 @@ static int HTTPParseContentTypeHeader(uint8_t *name, size_t name_len, * If the request contains a multipart message, this function will * set the HTP_BOUNDARY_SET in the transaction. */ -static int HtpRequestBodySetupMultipart(htp_tx_data_t *d, HtpTxUserData *htud) +static int HtpRequestBodySetupMultipart(htp_tx_t *tx, HtpTxUserData *htud) { - htp_header_t *h = (htp_header_t *)htp_table_get_c(d->tx->request_headers, + htp_header_t *h = (htp_header_t *)htp_table_get_c(tx->request_headers, "Content-Type"); if (h != NULL && bstr_len(h->value) > 0) { uint8_t *boundary = NULL; @@ -1857,7 +1857,7 @@ static int HTPCallbackRequestBodyData(htp_tx_data_t *d) if (d->tx->request_method_number == HTP_M_POST) { SCLogDebug("POST"); - int r = HtpRequestBodySetupMultipart(d, tx_ud); + int r = HtpRequestBodySetupMultipart(d->tx, tx_ud); if (r == 1) { tx_ud->request_body_type = HTP_BODY_REQUEST_MULTIPART; } else if (r == 0) { -- 2.47.2