]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http/multipart: small cleanup
authorVictor Julien <victor@inliniac.net>
Mon, 25 Nov 2019 18:09:10 +0000 (19:09 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 9 Dec 2019 10:13:51 +0000 (11:13 +0100)
src/app-layer-htp.c

index 23774709b8213acafb46c94e103fd8c44bdab464..e8b05e19390d5b4d31ef477390b16ea28410e102 100644 (file)
@@ -1314,9 +1314,9 @@ static int HtpRequestBodyHandleMultipart(HtpState *hstate, HtpTxUserData *htud,
     const uint8_t *header_start = Bs2bmSearch(chunks_buffer, chunks_buffer_len,
             boundary, expected_boundary_len);
     /* end of the multipart form */
-    uint8_t *form_end = NULL;
+    const uint8_t *form_end = NULL;
     /* end marker belonging to header_start */
-    uint8_t *header_end = NULL;
+    const uint8_t *header_end = NULL;
     if (header_start != NULL) {
         header_end = Bs2bmSearch(header_start, chunks_buffer_len - (header_start - chunks_buffer),
                 (uint8_t *)"\r\n\r\n", 4);
@@ -1437,7 +1437,7 @@ static int HtpRequestBodyHandleMultipart(HtpState *hstate, HtpTxUserData *htud,
                 &filename, &filename_len, &filetype, &filetype_len);
 
         if (filename != NULL) {
-            uint8_t *filedata = NULL;
+            const uint8_t *filedata = NULL;
             uint32_t filedata_len = 0;
 
             SCLogDebug("we have a filename");