diff --git a/pcre-8.42-Fix-subject-buffer-overread-in-JIT.patch b/pcre-8.42-Fix-subject-buffer-overread-in-JIT.patch new file mode 100644 index 0000000..1b64902 --- /dev/null +++ b/pcre-8.42-Fix-subject-buffer-overread-in-JIT.patch @@ -0,0 +1,29 @@ +From 1aa76cb33f04fcea3127a0859450e5d18369e5e2 Mon Sep 17 00:00:00 2001 +From: zherczeg +Date: Fri, 21 Sep 2018 07:34:10 +0000 +Subject: [PATCH] Fix subject buffer overread in JIT. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1740 2f5784b3-3f2a-0410-8824-cb99058d5e15 +Petr Písař: Ported to 8.42. +--- + pcre_jit_compile.c | 2 +- + +diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c +index 2bad74b..bc5f9c0 100644 +--- a/pcre_jit_compile.c ++++ b/pcre_jit_compile.c +@@ -9002,7 +9002,7 @@ if (exact > 1) + #ifdef SUPPORT_UTF + && !common->utf + #endif +- ) ++ && type != OP_ANYNL && type != OP_EXTUNI) + { + OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(exact)); + add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_GREATER, TMP1, 0, STR_END, 0)); +-- +2.17.2 + diff --git a/pcre.spec b/pcre.spec index 218d469..64b5ec5 100644 --- a/pcre.spec +++ b/pcre.spec @@ -2,7 +2,7 @@ #%%global rcversion RC1 Name: pcre Version: 8.42 -Release: %{?rcversion:0.}4%{?rcversion:.%rcversion}%{?dist} +Release: %{?rcversion:0.}5%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library ## Source package only: @@ -48,6 +48,9 @@ Patch5: pcre-8.42-Fix-bad-auto-possessify-for-certain-classes.patch # Fix anchoring in conditionals with only one branch, upstream bug #2307, # in upstream after 8.42 Patch6: pcre-8.42-Fix-anchoring-bug-in-conditional-subexpression.patch +# Fix a subject buffer overread in JIT when UTF is disabled and \X or \R has +# a greater than 1 fixed quantifier, in upstream after 8.42 +Patch7: pcre-8.42-Fix-subject-buffer-overread-in-JIT.patch BuildRequires: readline-devel BuildRequires: autoconf BuildRequires: automake @@ -136,6 +139,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # Because of rpath patch libtoolize --copy --force autoreconf -vif @@ -230,6 +234,10 @@ make %{?_smp_mflags} check VERBOSE=yes %{_mandir}/man1/pcretest.* %changelog +* Thu Nov 01 2018 Petr Pisar - 8.42-5 +- Fix a subject buffer overread in JIT when UTF is disabled and \X or \R has + a greater than 1 fixed quantifier + * Mon Sep 03 2018 Petr Pisar - 8.42-4 - Fix anchoring in conditionals with only one branch (upstream bug #2307)