mirror of
https://github.com/OISF/suricata.git
synced 2026-05-28 04:32:12 -04:00
detect/flowbits: fix scan-build 0-size alloc warning
detect-flowbits.c:761:29: warning: Call to 'calloc' has an allocation size of 0 bytes [optin.portability.UnixAPI]
761 | SCCalloc(sids_array_size, sizeof(uint32_t));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util-mem.h:36:18: note: expanded from macro 'SCCalloc'
36 | #define SCCalloc calloc
| ^
1 warning generated.
This commit is contained in:
parent
0c9e17b454
commit
06dcb5aeb0
1 changed files with 3 additions and 1 deletions
|
|
@ -753,7 +753,9 @@ int DetectFlowbitsAnalyze(DetectEngineCtx *de_ctx)
|
|||
s->init_data->init_flags |= SIG_FLAG_INIT_STATE_MATCH;
|
||||
s->init_data->is_rule_state_dependant = true;
|
||||
|
||||
uint32_t sids_array_size = array[i].set_sids_idx;
|
||||
const uint32_t sids_array_size = array[i].set_sids_idx;
|
||||
if (sids_array_size == 0)
|
||||
continue;
|
||||
|
||||
// save information about flowbits that affect this rule's state
|
||||
if (s->init_data->rule_state_dependant_sids_array == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue