Project

General

Profile

Bug #24 ยป 0001-Match-content-fail-when-two-contents-are-specified-i.patch

Better test it with this unittest - Pablo Rincon, 12/27/2009 07:36 PM

View differences:

src/detect-content.c
return DetectContentChunkMatchTestWrp(sig, 1);
}
/**
* \test Check if we match two consecutive simple contents
*/
int DetectContentChunkMatchTest10()
{
char *sig = "alert tcp any any -> any any (msg:\"Nothing..\"; "
" content:\"Hi, this is a big test to check \"; "
" content:\"con\"; "
" sid:1;)";
return DetectContentChunkMatchTestWrp(sig, 1);
}
/**
* \test Check if we match two contents of length 1
*/
int DetectContentChunkMatchTest11()
{
char *sig = "alert tcp any any -> any any (msg:\"Nothing..\"; "
" content:\"H\"; "
" content:\"i\"; "
" sid:1;)";
return DetectContentChunkMatchTestWrp(sig, 1);
}
int DetectContentParseTest09(void) {
int result = 0;
DetectContentData *cd = NULL;
......
UtRegisterTest("DetectContentChunkMatchTest07", DetectContentChunkMatchTest07, 1);
UtRegisterTest("DetectContentChunkMatchTest08", DetectContentChunkMatchTest08, 1);
UtRegisterTest("DetectContentChunkMatchTest09", DetectContentChunkMatchTest09, 1);
UtRegisterTest("DetectContentChunkMatchTest10", DetectContentChunkMatchTest10, 1);
UtRegisterTest("DetectContentChunkMatchTest11", DetectContentChunkMatchTest11, 1);
/* Negated content tests */
UtRegisterTest("SigTest41TestNegatedContent", SigTest41TestNegatedContent, 1);
    (1-1/1)