From: Angelo Mirabella Date: Tue, 16 Jun 2020 09:04:06 +0000 (+0100) Subject: detect/http_raw_header: Correct type mismatch X-Git-Tag: suricata-6.0.0-beta1~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cdc009da1c97784b3c1742b33fa817e9597ea68;p=thirdparty%2Fsuricata.git detect/http_raw_header: Correct type mismatch This changeset fixes a bug on the computation of the buffer lenght for raw http headers. The bug is due to a mismatch on the data type of the length (uint8_t vs uint32_t) and it was causing signature misses. --- diff --git a/src/detect-http-raw-header.c b/src/detect-http-raw-header.c index 45ceee2886..57d1b648f2 100644 --- a/src/detect-http-raw-header.c +++ b/src/detect-http-raw-header.c @@ -186,7 +186,7 @@ static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, tx_ud->request_headers_raw : tx_ud->response_headers_raw; if (data == NULL) return NULL; - const uint8_t data_len = ts ? + const uint32_t data_len = ts ? tx_ud->request_headers_raw_len : tx_ud->response_headers_raw_len; InspectionBufferSetup(buffer, data, data_len);