double port/address negation is parsed incorrectly

remotes/origin/master-1.0.x
Anoop Saldanha 16 years ago committed by Victor Julien
parent 6ab64706b0
commit f8edb74439

@ -2454,6 +2454,19 @@ int PortTestMatchReal19()
return PortTestMatchRealWrp(sig, 1);
}
static int PortTestMatchDoubleNegation(void)
{
int result = 0;
DetectPort *head = NULL, *nhead = NULL;
if (DetectPortParseDo(&head, &nhead, "![!80]", 0) == -1)
return result;
result = (head != NULL);
result = (nhead == NULL);
return result;
}
#endif /* UNITTESTS */
@ -2499,6 +2512,9 @@ void DetectPortTests(void) {
UtRegisterTest("PortTestMatchReal18", PortTestMatchReal18, 1);
UtRegisterTest("PortTestMatchReal19 (expected to fail, see bug #8)",
PortTestMatchReal19, 1);
UtRegisterTest("PortTestMatchDoubleNegation", PortTestMatchDoubleNegation, 1);
#endif /* UNITTESTS */
}

Loading…
Cancel
Save