]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/http_raw_header: Correct type mismatch
authorAngelo Mirabella <amirabella@lastline.com>
Tue, 16 Jun 2020 09:04:06 +0000 (10:04 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 29 Jun 2020 07:06:26 +0000 (09:06 +0200)
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.

src/detect-http-raw-header.c

index 45ceee2886817509ca3b4db3819312945fd46d9b..57d1b648f2cc8ca3bc7f4df15ce2649f04e205df 100644 (file)
@@ -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);