{
DetectDceOpnumRange *dor = NULL;
- if ( (dor = SCMalloc(sizeof(DetectDceOpnumRange))) == NULL)
+ if ( (dor = SCCalloc(1, sizeof(DetectDceOpnumRange))) == NULL)
return NULL;
- memset(dor, 0, sizeof(DetectDceOpnumRange));
dor->range1 = dor->range2 = DCE_OPNUM_RANGE_UNINITIALIZED;
-
return dor;
}
SCEnter();
DetectDceOpnumData *dce_data = (DetectDceOpnumData *)m;
- DetectDceOpnumRange *dor = dce_data->range;
DCERPCState *dcerpc_state = state;
if (dcerpc_state == NULL) {
SCLogDebug("No DCERPCState for the flow");
SCReturnInt(0);
}
- uint16_t opnum = dcerpc_state->dcerpc.dcerpcrequest.opnum;
+ uint16_t opnum = dcerpc_state->dcerpc.dcerpcrequest.opnum;
+ DetectDceOpnumRange *dor = dce_data->range;
for ( ; dor != NULL; dor = dor->next) {
if (dor->range2 == DCE_OPNUM_RANGE_UNINITIALIZED) {
if (dor->range1 == opnum) {
SCReturnInt(1);
}
} else {
- if (dor->range1 <= opnum && dor->range2 >= opnum)
- {
+ if (dor->range1 <= opnum && dor->range2 >= opnum) {
SCReturnInt(1);
}
}