Blame SOURCES/pcre2-10.32-Fix-subject-buffer-overread-in-JIT.-Found-by-Yunho-K.patch

d71fdb
From f3b9337a2280db816ef6b2cbe3750b2991944c22 Mon Sep 17 00:00:00 2001
d71fdb
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
d71fdb
Date: Tue, 18 Sep 2018 10:19:14 +0000
d71fdb
Subject: [PATCH] Fix subject buffer overread in JIT. Found by Yunho Kim.
d71fdb
MIME-Version: 1.0
d71fdb
Content-Type: text/plain; charset=UTF-8
d71fdb
Content-Transfer-Encoding: 8bit
d71fdb
d71fdb
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1011 6239d852-aaf2-0410-a92c-79f79f948069
d71fdb
d71fdb
Petr Písař: Ported to 10.32. The tests were removed because they need
d71fdb
a new test framework not availanble in 10.32.
d71fdb
d71fdb
Signed-off-by: Petr Písař <ppisar@redhat.com>
d71fdb
---
d71fdb
 src/pcre2_jit_compile.c | 2 +-
d71fdb
 1 file changed, 1 insertion(+), 1 deletion(-)
d71fdb
d71fdb
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
d71fdb
index 32e985b..b3015cc 100644
d71fdb
--- a/src/pcre2_jit_compile.c
d71fdb
+++ b/src/pcre2_jit_compile.c
d71fdb
@@ -9951,7 +9951,7 @@ if (exact > 1)
d71fdb
 #ifdef SUPPORT_UNICODE
d71fdb
       && !common->utf
d71fdb
 #endif
d71fdb
-      )
d71fdb
+      && type != OP_ANYNL && type != OP_EXTUNI)
d71fdb
     {
d71fdb
     OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(exact));
d71fdb
     add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_GREATER, TMP1, 0, STR_END, 0));
d71fdb
-- 
d71fdb
2.17.1
d71fdb