Project

General

Profile

Bug #25 ยป 0001-double-port-address-negation-is-parsed-incorrectly.patch

Anoop Saldanha, 12/27/2009 11:23 PM

View differences:

src/detect-engine-port.c
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 */
......
UtRegisterTest("PortTestMatchReal18", PortTestMatchReal18, 1);
UtRegisterTest("PortTestMatchReal19 (expected to fail, see bug #8)",
PortTestMatchReal19, 1);
UtRegisterTest("PortTestMatchDoubleNegation", PortTestMatchDoubleNegation, 1);
#endif /* UNITTESTS */
}
    (1-1/1)