During keyword setup there was a path that in theory could lead to
indexing an array with a negative int.
Coverity 400608
idad = DetectIsdataatParse(isdataatstr, &offset);
if (idad == NULL)
- goto end;
+ return -1;
int sm_list;
if (s->list != DETECT_SM_LIST_NOTSET) {
DETECT_ISDATAAT, s->sm_lists_tail[DETECT_SM_LIST_HRHHDMATCH]);
if (prev_pm == NULL)
sm_list = DETECT_SM_LIST_PMATCH;
- else
+ else {
sm_list = SigMatchListSMBelongsTo(s, prev_pm);
+ if (sm_list < 0)
+ goto end;
+ }
} else {
sm_list = DETECT_SM_LIST_PMATCH;
}
ret = 0;
end:
+ if (ret != 0)
+ DetectIsdataatFree(idad);
return ret;
}