diff --git a/pcre-8.30-Fix-look-behind-assertion-in-UTF-8-JIT-mode.patch b/pcre-8.30-Fix-look-behind-assertion-in-UTF-8-JIT-mode.patch new file mode 100644 index 0000000..6d5cabd --- /dev/null +++ b/pcre-8.30-Fix-look-behind-assertion-in-UTF-8-JIT-mode.patch @@ -0,0 +1,59 @@ +From 918ed08b4415c8f9a94c22588a328c712317dea9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 5 Apr 2012 17:30:16 +0200 +Subject: [PATCH] Fix look-behind assertion in UTF-8 JIT mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is back-port of upstream commit for pcre-8.30: +r953 | zherczeg | 2012-03-29 19:41:57 +0200 (Čt, 29 bře 2012) | 1 line +Fixed a bug for backward assertions with REVERSE 0 in the JIT compiler +--- + pcre_jit_compile.c | 3 ++- + testdata/testinput5 | 3 +++ + testdata/testoutput5 | 4 ++++ + 3 files changed, 9 insertions(+), 1 deletions(-) + +diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c +index 97d227c..dfb78a7 100644 +--- a/pcre_jit_compile.c ++++ b/pcre_jit_compile.c +@@ -3417,7 +3417,8 @@ switch(type) + + case OP_REVERSE: + length = GET(cc, 0); +- SLJIT_ASSERT(length > 0); ++ if (length == 0) ++ return cc + LINK_SIZE; + OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); + #ifdef SUPPORT_UTF + if (common->utf) +diff --git a/testdata/testinput5 b/testdata/testinput5 +index 4f7cb32..de41fce 100644 +--- a/testdata/testinput5 ++++ b/testdata/testinput5 +@@ -691,4 +691,7 @@ + \x{2027}\x{2030}\x{2028}\x{2029} + \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d + ++/(?= 0xd800 && <= 0xdfff) at offset 7 + \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d + 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d} + ++/(? - 8.30-3 +- Fix look-behind assertion in UTF-8 JIT mode (bug #810314) + * Tue Feb 28 2012 Petr Pisar - 8.30-2 - Remove old libpcre.so.0 from distribution - Move library to /usr