detect/flowbits: align pointer in the struct

Makes leak sanitizer work without adding LSAN_OPTIONS=use_unaligned=1

Otherwise, leak sanitizer may report rule_id as leaked
when it is still owned by some global variable
pull/14705/head
Philippe Antoine 9 months ago committed by Victor Julien
parent 5d61f5253d
commit d046e82db6

@ -1033,10 +1033,10 @@ static bool PrefilterFlowbitIsPrefilterable(const Signature *s)
/** core flowbit data structure: map a flowbit id to the signatures that need inspecting after it is
* found. Part of a rb-tree. */
typedef struct PrefilterFlowbit {
uint32_t *rule_id; /**< array of signature iid that are part of this prefilter */
uint32_t id; /**< flowbit id */
uint32_t rule_id_size; /**< size in elements of `rule_id` */
uint32_t rule_id_cnt; /**< usage in elements of `rule_id` */
uint32_t *rule_id; /**< array of signature iid that are part of this prefilter */
RB_ENTRY(PrefilterFlowbit) __attribute__((__packed__)) rb;
} __attribute__((__packed__)) PrefilterFlowbit;

Loading…
Cancel
Save