From cbb03dbb39d76cf1a2770ef35ba07aac5c3657b5 Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Mon, 8 Feb 2021 08:06:53 -0500 Subject: [PATCH] detect/pcre: Test capture group/var mismatch --- src/detect-pcre.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/detect-pcre.c b/src/detect-pcre.c index 2d4a4dc766..9bff6d044d 100644 --- a/src/detect-pcre.c +++ b/src/detect-pcre.c @@ -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); -- 2.47.2