From: Victor Julien Date: Thu, 4 Jun 2020 20:50:38 +0000 (+0200) Subject: htp: enforce body limits more exact X-Git-Tag: suricata-6.0.0-beta1~353 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4568a634d5df223a4caaed4552b54f9e4598c12;p=thirdparty%2Fsuricata.git htp: enforce body limits more exact --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 08b6ae9b82..4bc26f06da 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -1928,9 +1928,9 @@ static int HTPCallbackRequestBodyData(htp_tx_data_t *d) HtpRequestBodyHandleMultipart(hstate, tx_ud, d->tx, chunks_buffer, chunks_buffer_len); } else if (tx_ud->request_body_type == HTP_BODY_REQUEST_POST) { - HtpRequestBodyHandlePOST(hstate, tx_ud, d->tx, (uint8_t *)d->data, (uint32_t)d->len); + HtpRequestBodyHandlePOST(hstate, tx_ud, d->tx, (uint8_t *)d->data, len); } else if (tx_ud->request_body_type == HTP_BODY_REQUEST_PUT) { - HtpRequestBodyHandlePUT(hstate, tx_ud, d->tx, (uint8_t *)d->data, (uint32_t)d->len); + HtpRequestBodyHandlePUT(hstate, tx_ud, d->tx, (uint8_t *)d->data, len); } } else { @@ -2027,7 +2027,7 @@ static int HTPCallbackResponseBodyData(htp_tx_data_t *d) HtpBodyAppendChunk(&hstate->cfg->response, &tx_ud->response_body, d->data, len); - HtpResponseBodyHandle(hstate, tx_ud, d->tx, (uint8_t *)d->data, (uint32_t)d->len); + HtpResponseBodyHandle(hstate, tx_ud, d->tx, (uint8_t *)d->data, len); } else { if (tx_ud->tcflags & HTP_FILENAME_SET) { SCLogDebug("closing file that was being stored");