Skip to content

Commit 4b1b139

Browse files
catenacybervictorjulien
authored andcommitted
detect/flowbits: align all pointers in the struct
Makes leak sanitizer work without adding LSAN_OPTIONS=use_unaligned=1 Otherwise, leak sanitizer may report the read and black tree pointers as leaked when it is still owned by some global variable. Follow-up on d046e82
1 parent 3a9682f commit 4b1b139

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/detect-flowbits.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,10 +1034,10 @@ static bool PrefilterFlowbitIsPrefilterable(const Signature *s)
10341034
* found. Part of a rb-tree. */
10351035
typedef struct PrefilterFlowbit {
10361036
uint32_t *rule_id; /**< array of signature iid that are part of this prefilter */
1037+
RB_ENTRY(PrefilterFlowbit) __attribute__((__packed__)) rb;
10371038
uint32_t id; /**< flowbit id */
10381039
uint32_t rule_id_size; /**< size in elements of `rule_id` */
10391040
uint32_t rule_id_cnt; /**< usage in elements of `rule_id` */
1040-
RB_ENTRY(PrefilterFlowbit) __attribute__((__packed__)) rb;
10411041
} __attribute__((__packed__)) PrefilterFlowbit;
10421042

10431043
static int PrefilterFlowbitCompare(const PrefilterFlowbit *a, const PrefilterFlowbit *b)

0 commit comments

Comments
 (0)