diff --git a/src/detect-parse.c b/src/detect-parse.c index 03205a8f0d..08a1e85196 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -543,6 +543,9 @@ SigMatch *DetectGetLastSMByListId(const Signature *s, int list_id, ...) SigMatch *sm_new; int sm_type; + if ((uint32_t)list_id >= s->init_data->smlists_array_size) { + return NULL; + } SigMatch *sm_list = s->init_data->smlists_tail[list_id]; if (sm_list == NULL) return NULL;