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

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