Project

General

Profile

Bug #202 » 0001-pcre-recursive-matching-not-implemented.patch

Anoop Saldanha, 07/05/2010 08:46 AM

View differences:

src/detect-engine-payload.c
return result;
}
/**
* \test Test pcre recursive matching.
*/
static int PayloadTestSig08(void)
{
uint8_t *buf = (uint8_t *)"this is a super nova in super nova now";
uint16_t buflen = strlen((char *)buf);
Packet *p = UTHBuildPacket( buf, buflen, IPPROTO_TCP);
int result = 0;
char sig[] = "alert tcp any any -> any any (msg:\"dummy\"; "
"pcre:/super/; content:nova; within:7; sid:1;)";
if (UTHPacketMatchSigMpm(p, sig, MPM_B2G) == 0) {
result = 0;
goto end;
}
result = 1;
end:
if (p != NULL)
UTHFreePacket(p);
return result;
}
#endif /* UNITTESTS */
void PayloadRegisterTests(void) {
......
UtRegisterTest("PayloadTestSig05", PayloadTestSig05, 1);
UtRegisterTest("PayloadTestSig06", PayloadTestSig06, 1);
UtRegisterTest("PayloadTestSig07", PayloadTestSig07, 1);
UtRegisterTest("PayloadTestSig08", PayloadTestSig08, 1);
#endif /* UNITTESTS */
}
(1-1/3)