SigMatch would be added to list, then the alproto check failed, leading
to freeing of sm. But as it was still in the list, the list now contained
a dangling pointer.
sm->ctx = NULL;
}
- SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_FILEMATCH);
- s->filestore_sm = sm;
-
if (s->alproto != ALPROTO_HTTP && s->alproto != ALPROTO_SMTP) {
SCLogError(SC_ERR_CONFLICTING_RULE_KEYWORDS, "rule contains conflicting keywords.");
goto error;
AppLayerHtpNeedFileInspection();
}
+ SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_FILEMATCH);
+ s->filestore_sm = sm;
+
s->flags |= SIG_FLAG_FILESTORE;
return 0;