Skip to content

Commit

Permalink
detect/pcre: Test capture group/var mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucovsky committed Feb 8, 2021
1 parent 4cd84ec commit b10449b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/detect-pcre.c
Original file line number Diff line number Diff line change
Expand Up @@ -3552,6 +3552,11 @@ static int DetectPcreParseCaptureTest(void)
s = DetectEngineAppendSig(de_ctx, "alert http any any -> any any "
"(content:\"Server: \"; http_header; pcre:\"/([a-z]+)([0-9]+)\\r\\n/HR, flow:somecapture, pkt:anothercap\"; content:\"xyz\"; http_header; sid:3;)");
FAIL_IF(s == NULL);
s = DetectEngineAppendSig(de_ctx,
"alert http any any -> any any "
"(content:\"Server: \"; http_header; pcre:\"/([a-z]+)\\r\\n/HR, flow:somecapture, "
"pkt:anothercap\"; content:\"xyz\"; http_header; sid:3;)");
FAIL_IF_NOT_NULL(s);

SigGroupBuild(de_ctx);

Expand Down

0 comments on commit b10449b

Please sign in to comment.