diff --git a/pcre2-10.34-Fix-bad-lookbehind-compilation-when-preceded-by-a-DE.patch b/pcre2-10.34-Fix-bad-lookbehind-compilation-when-preceded-by-a-DE.patch new file mode 100644 index 0000000..34b5781 --- /dev/null +++ b/pcre2-10.34-Fix-bad-lookbehind-compilation-when-preceded-by-a-DE.patch @@ -0,0 +1,60 @@ +From 5bf35f661b7a73e892f6181f22988e5531960501 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Mon, 24 Feb 2020 17:29:00 +0000 +Subject: [PATCH] Fix bad lookbehind compilation when preceded by a DEFINE + group. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1228 6239d852-aaf2-0410-a92c-79f79f948069 +Petr Písař: Ported to 10.34. +--- + src/pcre2_compile.c | 4 ++++ + testdata/testinput1 | 3 +++ + testdata/testoutput1 | 4 ++++ + 3 files changed, 11 insertions(+) + +diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c +index 628503c..8083338 100644 +--- a/src/pcre2_compile.c ++++ b/src/pcre2_compile.c +@@ -9588,6 +9588,10 @@ for (; *pptr != META_END; pptr++) + break; + + case META_COND_DEFINE: ++ pptr += SIZEOFFSET; ++ nestlevel++; ++ break; ++ + case META_COND_NAME: + case META_COND_NUMBER: + case META_COND_RNAME: +diff --git a/testdata/testinput1 b/testdata/testinput1 +index 959d4b8..6135681 100644 +--- a/testdata/testinput1 ++++ b/testdata/testinput1 +@@ -6399,4 +6399,7 @@ ef) x/x,mark + "(?<=X(?(DEFINE)(Y))(?1))." + AXYZ + ++"(?(DEFINE)(?bar))(?bar))(? - 10.34-8 - Fix computing an offest for the start of the UTF-16 error when a high surrogate is not followed by a valid low surrogate (upstream bug #2527) +- Fix compiling a lookbehind when preceded by a DEFINE group + (upstream bug #2531) * Thu Feb 20 2020 Petr Pisar - 10.34-7 - Fix a crash in JIT when an invalid UTF-8 character is encountered in