From 3be538015bf4ab00becbb601f22cdc24af4222dc Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Mon, 24 Feb 2020 17:29:00 +0000 Subject: [PATCH] Fix bad lookbehind compilation when preceded by a DEFINE group. --- ChangeLog | 5 +++++ src/pcre2_compile.c | 5 +++++ testdata/testinput1 | 3 +++ testdata/testoutput1 | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9f493be..95e0123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -77,6 +77,11 @@ low surrogate. This caused incorrect behaviour, for example when PCRE2_MATCH_INVALID_UTF was set and a match started immediately following the invalid high surrogate, such as /aa/ matching "\x{d800}aa". +20. If a DEFINE group immediately preceded a lookbehind assertion, the pattern +could be mis-compiled and therefore not match correctly. This is the example +that found this: /(?(DEFINE)(?bar))(?bar))(?bar))(?