Bug #377 » 0001-Fixed-duplicate-signature-check.patch
src/detect-parse.c | ||
---|---|---|
if (sw1 == NULL || sw2 == NULL)
|
||
return 0;
|
||
if (sw1->s->id != sw2->s->id)
|
||
return 0;
|
||
/* be careful all you non-related signatures with the same sid and no msg.
|
||
* We treat you all as the same signature */
|
||
if ((sw1->s->msg == NULL) && (sw2->s->msg == NULL))
|
||
if (sw1->s->id == sw2->s->id)
|
||
return 1;
|
||
if ((sw1->s->msg == NULL) || (sw2->s->msg == NULL))
|
||
return 0;
|
||
if (strlen(sw1->s->msg) != strlen(sw2->s->msg))
|
||
return 0;
|
||
if (strcmp(sw1->s->msg, sw2->s->msg) != 0)
|
||
return 0;
|
||
return 1;
|
||
return 0;
|
||
}
|
||
/**
|
||
... | ... | |
DetectParseDupSigCompareFunc,
|
||
DetectParseDupSigFreeFunc);
|
||
if (de_ctx->dup_sig_hash_table == NULL)
|
||
goto error;
|
||
return -1;
|
||
return 0;
|
||
error:
|
||
return -1;
|
||
}
|
||
/**
|