]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: move fields around to fill memory holes
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 7 Jan 2025 12:57:25 +0000 (13:57 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 8 Jan 2025 16:06:10 +0000 (17:06 +0100)
to make scan-build happy avoiding its warning :

Excessive padding in 'struct DetectEngineThreadCtx_'
(33 padding bytes, where 1 is optimal)

src/detect.h

index b0147e552f1274fea782835cb024a91f2723401d..ea81092487b59587d6253e3ea717d93573e1724b 100644 (file)
@@ -1137,9 +1137,6 @@ typedef struct DetectEngineThreadCtx_ {
     /* byte_* values */
     uint64_t *byte_values;
 
-    uint8_t *base64_decoded;
-    int base64_decoded_len;
-
     /* counter for the filestore array below -- up here for cache reasons. */
     uint16_t filestore_cnt;
 
@@ -1181,6 +1178,9 @@ typedef struct DetectEngineThreadCtx_ {
                                         on a frame is complete. */
     Packet *p;
 
+    uint8_t *base64_decoded;
+    int base64_decoded_len;
+
     uint16_t alert_queue_size;
     uint16_t alert_queue_capacity;
     PacketAlert *alert_queue;