diff --git a/pcre2-10.10-Fix-multilib.patch b/backport-pcre2-10.10-Fix-multilib.patch similarity index 100% rename from pcre2-10.10-Fix-multilib.patch rename to backport-pcre2-10.10-Fix-multilib.patch diff --git a/backport-pcre2-10.36-Get-rid-of-gcc-fanalyzer-error-though-it-was-probabl.patch b/backport-pcre2-10.36-Get-rid-of-gcc-fanalyzer-error-though-it-was-probabl.patch new file mode 100644 index 0000000000000000000000000000000000000000..b5b33c6dea56ca3d884929abc8e69c2e677822f0 --- /dev/null +++ b/backport-pcre2-10.36-Get-rid-of-gcc-fanalyzer-error-though-it-was-probabl.patch @@ -0,0 +1,59 @@ +From 32e83fc2d59413d13039cc31db1558d9c0e3b874 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Thu, 14 Jan 2021 16:56:44 +0000 +Subject: [PATCH] Get rid of gcc -fanalyzer error (though it was probably a + false positive). +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@1293 6239d852-aaf2-0410-a92c-79f79f948069 +Signed-off-by: Petr Písař +Petr Pisar: Ported to 10.36. +--- + src/pcre2_auto_possess.c | 13 +++++++++---- + +diff --git a/src/pcre2_auto_possess.c b/src/pcre2_auto_possess.c +index c64cf85..66064ed 100644 +--- a/src/pcre2_auto_possess.c ++++ b/src/pcre2_auto_possess.c +@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Original API code Copyright (c) 1997-2012 University of Cambridge +- New API code Copyright (c) 2016-2020 University of Cambridge ++ New API code Copyright (c) 2016-2021 University of Cambridge + + ----------------------------------------------------------------------------- + Redistribution and use in source and binary forms, with or without +@@ -490,6 +490,7 @@ switch(c) + list[2] = (uint32_t)(end - code); + return end; + } ++ + return NULL; /* Opcode not accepted */ + } + +@@ -1186,12 +1187,16 @@ for (;;) + c = *repeat_opcode; + if (c >= OP_CRSTAR && c <= OP_CRMINRANGE) + { +- /* end must not be NULL. */ ++ /* The return from get_chr_property_list() will never be NULL when ++ *code (aka c) is one of the three class opcodes. However, gcc with ++ -fanalyzer notes that a NULL return is possible, and grumbles. Hence we ++ put in a check. */ ++ + end = get_chr_property_list(code, utf, ucp, cb->fcc, list); +- + list[1] = (c & 1) == 0; + +- if (compare_opcodes(end, utf, ucp, cb, list, end, &rec_limit)) ++ if (end != NULL && ++ compare_opcodes(end, utf, ucp, cb, list, end, &rec_limit)) + { + switch (c) + { +-- +2.26.2 + diff --git a/pcre2-10.35-Apply-H.J.-Lu-s-patch-to-pass-mshstk-to-the-compiler.patch b/pcre2-10.35-Apply-H.J.-Lu-s-patch-to-pass-mshstk-to-the-compiler.patch deleted file mode 100644 index 6c471af2783a5f15055614ded378023b7d7bd0db..0000000000000000000000000000000000000000 --- a/pcre2-10.35-Apply-H.J.-Lu-s-patch-to-pass-mshstk-to-the-compiler.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 4f0b3ea9771e49fb0d5e5c323e7966ceff2c7ec2 Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Mon, 25 May 2020 16:03:24 +0000 -Subject: [PATCH 1/2] Apply H.J. Lu's patch to pass -mshstk to the compiler - when Intel CET is enabled. CMake version invented by PH, but only tested on - non-CET system. -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@1256 6239d852-aaf2-0410-a92c-79f79f948069 -Petr Písař: Ported to 10.35. ---- - CMakeLists.txt | 19 +++++++++++++++++++ - Makefile.am | 1 + - configure.ac | 15 +++++++++++++++ - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 86b8896..5e8a763 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -92,6 +92,7 @@ - # library versioning. - # 2020-04-25 Carlo added function check for mkostemp used in ProtExecAllocator - # 2020-04-28 PH added function check for memfd_create based on Carlo's patch -+# 2020-05-25 PH added a check for Intel CET - - PROJECT(PCRE2 C) - -@@ -146,6 +147,24 @@ CHECK_C_SOURCE_COMPILES( - ) - set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) - -+# Check whether Intel CET is enabled, and if so, adjust compiler flags. This -+# code was written by PH, trying to imitate the logic from the autotools -+# configuration. -+ -+CHECK_C_SOURCE_COMPILES( -+ "#ifndef __CET__ -+ #error CET is not enabled -+ #endif -+ int main() { return 0; }" -+ INTEL_CET_ENABLED -+) -+ -+IF (INTEL_CET_ENABLED) -+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk") -+ENDIF(INTEL_CET_ENABLED) -+ -+ -+ - # User-configurable options - # - # Note: CMakeSetup displays these in alphabetical order, regardless of -diff --git a/Makefile.am b/Makefile.am -index bb888f2..af6b92b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -391,6 +391,7 @@ nodist_libpcre2_8_la_SOURCES = \ - libpcre2_8_la_CFLAGS = \ - -DPCRE2_CODE_UNIT_WIDTH=8 \ - $(VISIBILITY_CFLAGS) \ -+ $(CET_CFLAGS) \ - $(AM_CFLAGS) - libpcre2_8_la_LIBADD = - endif # WITH_PCRE2_8 -diff --git a/configure.ac b/configure.ac -index 180d3dc..61b93ba 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1006,6 +1006,21 @@ fi # enable_coverage - - AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"]) - -+AC_MSG_CHECKING([whether Intel CET is enabled]) -+AC_LANG_PUSH([C]) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, -+ [[#ifndef __CET__ -+# error CET is not enabled -+#endif]])], -+ [pcre2_cc_cv_intel_cet_enabled=yes], -+ [pcre2_cc_cv_intel_cet_enabled=no]) -+AC_MSG_RESULT([$pcre2_cc_cv_intel_cet_enabled]) -+if test "$pcre2_cc_cv_intel_cet_enabled" = yes; then -+ CET_CFLAGS="-mshstk" -+ AC_SUBST([CET_CFLAGS]) -+fi -+AC_LANG_POP([C]) -+ - # Produce these files, in addition to config.h. - AC_CONFIG_FILES( - Makefile --- -2.25.4 - diff --git a/pcre2-10.35-Fix-an-early-fail-optimization-issue-and-a-buffer-ov.patch b/pcre2-10.35-Fix-an-early-fail-optimization-issue-and-a-buffer-ov.patch deleted file mode 100644 index 466a0be6bcda251b3a61000416b488547f3298de..0000000000000000000000000000000000000000 --- a/pcre2-10.35-Fix-an-early-fail-optimization-issue-and-a-buffer-ov.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 938cca6343300495c67461c08f4732f098a7ce30 Mon Sep 17 00:00:00 2001 -From: zherczeg -Date: Wed, 15 Jul 2020 04:35:32 +0000 -Subject: [PATCH] Fix an early fail optimization issue and a 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/pcre2/code/trunk@1267 6239d852-aaf2-0410-a92c-79f79f948069 -Petr Písař: Ported to 10.35. ---- - src/pcre2_jit_compile.c | 24 ++++++++++++------------ - src/pcre2_jit_test.c | 1 + - -diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c -index 7c5d63b..2bd4275 100644 ---- a/src/pcre2_jit_compile.c -+++ b/src/pcre2_jit_compile.c -@@ -1466,9 +1466,9 @@ do - default: - accelerated_start = NULL; - fast_forward_allowed = FALSE; -- break; -+ continue; - } -- continue; -+ break; - - case OP_ONCE: - case OP_BRA: -@@ -1834,57 +1834,57 @@ while (cc < ccend) - case OP_BRAZERO: - case OP_BRAMINZERO: - case OP_BRAPOSZERO: -- repeat_check = FALSE; - size = 1; -+ repeat_check = FALSE; - break; - - CASE_ITERATOR_PRIVATE_DATA_1 -- space = 1; - size = -2; -+ space = 1; - break; - - CASE_ITERATOR_PRIVATE_DATA_2A -- space = 2; - size = -2; -+ space = 2; - break; - - CASE_ITERATOR_PRIVATE_DATA_2B -- space = 2; - size = -(2 + IMM2_SIZE); -+ space = 2; - break; - - CASE_ITERATOR_TYPE_PRIVATE_DATA_1 -- space = 1; - size = 1; -+ space = 1; - break; - - CASE_ITERATOR_TYPE_PRIVATE_DATA_2A -+ size = 1; - if (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI) - space = 2; -- size = 1; - break; - - case OP_TYPEUPTO: -+ size = 1 + IMM2_SIZE; - if (cc[1 + IMM2_SIZE] != OP_ANYNL && cc[1 + IMM2_SIZE] != OP_EXTUNI) - space = 2; -- size = 1 + IMM2_SIZE; - break; - - case OP_TYPEMINUPTO: -- space = 2; - size = 1 + IMM2_SIZE; -+ space = 2; - break; - - case OP_CLASS: - case OP_NCLASS: -- space = get_class_iterator_size(cc + size); - size = 1 + 32 / sizeof(PCRE2_UCHAR); -+ space = get_class_iterator_size(cc + size); - break; - - #if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8 - case OP_XCLASS: -- space = get_class_iterator_size(cc + size); - size = GET(cc, 1); -+ space = get_class_iterator_size(cc + size); - break; - #endif - -diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c -index 16dade7..b7856ad 100644 ---- a/src/pcre2_jit_test.c -+++ b/src/pcre2_jit_test.c -@@ -350,6 +350,7 @@ static struct regression_test_case regression_test_cases[] = { - { MU, A, 0, 0, ".[ab]*.", "xx" }, - { MU, A, 0, 0, ".[ab]*a", "xxa" }, - { MU, A, 0, 0, ".[ab]?.", "xx" }, -+ { MU, A, 0, 0, "_[ab]+_*a", "_aa" }, - - /* Bracket repeats with limit. */ - { MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" }, --- -2.25.4 - diff --git a/pcre2-10.35-Fix-inifinite-loop-when-a-single-byte-newline-is-sea.patch b/pcre2-10.35-Fix-inifinite-loop-when-a-single-byte-newline-is-sea.patch deleted file mode 100644 index 254258da3c88455b445d8fb2161a8eb63cdf4cef..0000000000000000000000000000000000000000 --- a/pcre2-10.35-Fix-inifinite-loop-when-a-single-byte-newline-is-sea.patch +++ /dev/null @@ -1,157 +0,0 @@ -From 58040c3b15f966857eef0b35885800f0805e7c7a Mon Sep 17 00:00:00 2001 -From: zherczeg -Date: Fri, 29 May 2020 14:20:23 +0000 -Subject: [PATCH] Fix inifinite loop when a single byte newline is searched in - JIT. -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@1258 6239d852-aaf2-0410-a92c-79f79f948069 -Petr Písař: Ported to 10.35. ---- - src/pcre2_jit_compile.c | 9 ++++++++- - src/pcre2_jit_test.c | 38 +++++++++++++++++++++++++------------- - -diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c -index 33ad7e6..4a3ddd8 100644 ---- a/src/pcre2_jit_compile.c -+++ b/src/pcre2_jit_compile.c -@@ -4578,7 +4578,14 @@ if (common->nltype != NLTYPE_ANY) - /* All newlines are ascii, just skip intermediate octets. */ - jump[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); - loop = LABEL(); -- OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); -+ if (sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_SUPP | SLJIT_MEM_POST, TMP2, SLJIT_MEM1(STR_PTR), IN_UCHARS(1)) == SLJIT_SUCCESS) -+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_POST, TMP2, SLJIT_MEM1(STR_PTR), IN_UCHARS(1)); -+ else -+ { -+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); -+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); -+ } -+ - OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xc0); - CMPTO(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, 0x80, loop); - OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); -diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c -index a29fffa..16dade7 100644 ---- a/src/pcre2_jit_test.c -+++ b/src/pcre2_jit_test.c -@@ -1831,7 +1831,9 @@ struct invalid_utf8_regression_test_case { - const char *input; - }; - --static struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cases[] = { -+static const char invalid_utf8_newline_cr; -+ -+static const struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cases[] = { - { UDA, CI, 0, 0, 0, 0, 4, { ".", NULL }, "\xf4\x8f\xbf\xbf" }, - { UDA, CI, 0, 0, 0, 0, 4, { ".", NULL }, "\xf0\x90\x80\x80" }, - { UDA, CI, 0, 0, 0, -1, -1, { ".", NULL }, "\xf4\x90\x80\x80" }, -@@ -1974,6 +1976,8 @@ static struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cas - { 0, PCRE2_JIT_COMPLETE, 0, 0, 1, -1, -1, { "\\X{2}", NULL }, "\r\n\n" }, - { 0, PCRE2_JIT_COMPLETE, 0, 0, 1, -1, -1, { "\\R{2}", NULL }, "\r\n\n" }, - -+ { PCRE2_UTF | PCRE2_MULTILINE, CI, 0, 0, 0, -1, -1, { "^.a", &invalid_utf8_newline_cr }, "\xc3\xa7#a" }, -+ - { 0, 0, 0, 0, 0, 0, 0, { NULL, NULL }, NULL } - }; - -@@ -1981,7 +1985,7 @@ static struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cas - #undef CI - #undef CPI - --static int run_invalid_utf8_test(struct invalid_utf8_regression_test_case *current, -+static int run_invalid_utf8_test(const struct invalid_utf8_regression_test_case *current, - int pattern_index, int i, pcre2_compile_context_8 *ccontext, pcre2_match_data_8 *mdata) - { - pcre2_code_8 *code; -@@ -2034,7 +2038,7 @@ static int run_invalid_utf8_test(struct invalid_utf8_regression_test_case *curre - - static int invalid_utf8_regression_tests(void) - { -- struct invalid_utf8_regression_test_case *current; -+ const struct invalid_utf8_regression_test_case *current; - pcre2_compile_context_8 *ccontext; - pcre2_match_data_8 *mdata; - int total = 0, successful = 0; -@@ -2051,10 +2055,18 @@ static int invalid_utf8_regression_tests(void) - total++; - - result = 1; -- if (!run_invalid_utf8_test(current, total - 1, 0, ccontext, mdata)) -- result = 0; -- if (!run_invalid_utf8_test(current, total - 1, 1, ccontext, mdata)) -- result = 0; -+ if (current->pattern[1] != &invalid_utf8_newline_cr) -+ { -+ if (!run_invalid_utf8_test(current, total - 1, 0, ccontext, mdata)) -+ result = 0; -+ if (!run_invalid_utf8_test(current, total - 1, 1, ccontext, mdata)) -+ result = 0; -+ } else { -+ pcre2_set_newline_8(ccontext, PCRE2_NEWLINE_CR); -+ if (!run_invalid_utf8_test(current, total - 1, 0, ccontext, mdata)) -+ result = 0; -+ pcre2_set_newline_8(ccontext, PCRE2_NEWLINE_ANY); -+ } - - if (result) { - successful++; -@@ -2128,7 +2140,7 @@ static PCRE2_UCHAR16 test16_10[] = { ' ', 0xdc00, 0xd800, 0x2028, '#', 0 }; - static PCRE2_UCHAR16 test16_11[] = { 0xdc00, 0xdc00, 0xd800, 0xdc00, 0xdc00, '#', 0xd800, 0xdc00, '#', 0 }; - static PCRE2_UCHAR16 test16_12[] = { '#', 0xd800, 0xdc00, 0xd800, '#', 0xd800, 0xdc00, 0xdc00, 0xdc00, '#', 0xd800, 0xdc00, '#', 0 }; - --static struct invalid_utf16_regression_test_case invalid_utf16_regression_test_cases[] = { -+static const struct invalid_utf16_regression_test_case invalid_utf16_regression_test_cases[] = { - { UDA, CI, 0, 0, 0, 0, 1, { allany16, NULL }, test16_1 }, - { UDA, CI, 1, 0, 0, 1, 2, { allany16, NULL }, test16_1 }, - { UDA, CI, 2, 0, 0, 2, 3, { allany16, NULL }, test16_1 }, -@@ -2182,7 +2194,7 @@ static struct invalid_utf16_regression_test_case invalid_utf16_regression_test_c - #undef CI - #undef CPI - --static int run_invalid_utf16_test(struct invalid_utf16_regression_test_case *current, -+static int run_invalid_utf16_test(const struct invalid_utf16_regression_test_case *current, - int pattern_index, int i, pcre2_compile_context_16 *ccontext, pcre2_match_data_16 *mdata) - { - pcre2_code_16 *code; -@@ -2242,7 +2254,7 @@ static int run_invalid_utf16_test(struct invalid_utf16_regression_test_case *cur - - static int invalid_utf16_regression_tests(void) - { -- struct invalid_utf16_regression_test_case *current; -+ const struct invalid_utf16_regression_test_case *current; - pcre2_compile_context_16 *ccontext; - pcre2_match_data_16 *mdata; - int total = 0, successful = 0; -@@ -2329,7 +2341,7 @@ static PCRE2_UCHAR32 test32_4[] = { '#', 0x10ffff, 0x110000, 0 }; - static PCRE2_UCHAR32 test32_5[] = { ' ', 0x2028, '#', 0 }; - static PCRE2_UCHAR32 test32_6[] = { ' ', 0x110000, 0x2028, '#', 0 }; - --static struct invalid_utf32_regression_test_case invalid_utf32_regression_test_cases[] = { -+static const struct invalid_utf32_regression_test_case invalid_utf32_regression_test_cases[] = { - { UDA, CI, 0, 0, 0, 0, 1, { allany32, NULL }, test32_1 }, - { UDA, CI, 2, 0, 0, -1, -1, { allany32, NULL }, test32_1 }, - { UDA, CI, 0, 0, 0, 0, 1, { allany32, NULL }, test32_2 }, -@@ -2369,7 +2381,7 @@ static struct invalid_utf32_regression_test_case invalid_utf32_regression_test_c - #undef CI - #undef CPI - --static int run_invalid_utf32_test(struct invalid_utf32_regression_test_case *current, -+static int run_invalid_utf32_test(const struct invalid_utf32_regression_test_case *current, - int pattern_index, int i, pcre2_compile_context_32 *ccontext, pcre2_match_data_32 *mdata) - { - pcre2_code_32 *code; -@@ -2429,7 +2441,7 @@ static int run_invalid_utf32_test(struct invalid_utf32_regression_test_case *cur - - static int invalid_utf32_regression_tests(void) - { -- struct invalid_utf32_regression_test_case *current; -+ const struct invalid_utf32_regression_test_case *current; - pcre2_compile_context_32 *ccontext; - pcre2_match_data_32 *mdata; - int total = 0, successful = 0; --- -2.25.4 - diff --git a/pcre2-10.35-Fix-previous-commit-include-CET_CFLAGS-in-16-bit-and.patch b/pcre2-10.35-Fix-previous-commit-include-CET_CFLAGS-in-16-bit-and.patch deleted file mode 100644 index db710173c64e81ccc2271d3cc24b313223bb31cd..0000000000000000000000000000000000000000 --- a/pcre2-10.35-Fix-previous-commit-include-CET_CFLAGS-in-16-bit-and.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 842cc30948723f3fe3e7e71ebcb18191ae5324ed Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Tue, 26 May 2020 15:18:35 +0000 -Subject: [PATCH 2/2] Fix previous commit: include CET_CFLAGS in 16-bit and - 32-bit builds under AutoTools. -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@1257 6239d852-aaf2-0410-a92c-79f79f948069 -Signed-off-by: Petr Písař ---- - Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Makefile.am b/Makefile.am -index af6b92b..6a771a5 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -405,6 +405,7 @@ nodist_libpcre2_16_la_SOURCES = \ - libpcre2_16_la_CFLAGS = \ - -DPCRE2_CODE_UNIT_WIDTH=16 \ - $(VISIBILITY_CFLAGS) \ -+ $(CET_CFLAGS) \ - $(AM_CFLAGS) - libpcre2_16_la_LIBADD = - endif # WITH_PCRE2_16 -@@ -418,6 +419,7 @@ nodist_libpcre2_32_la_SOURCES = \ - libpcre2_32_la_CFLAGS = \ - -DPCRE2_CODE_UNIT_WIDTH=32 \ - $(VISIBILITY_CFLAGS) \ -+ $(CET_CFLAGS) \ - $(AM_CFLAGS) - libpcre2_32_la_LIBADD = - endif # WITH_PCRE2_32 --- -2.25.4 - diff --git a/pcre2-10.35-Fix-read-overflow-for-invalid-VERSION-test-with-one-.patch b/pcre2-10.35-Fix-read-overflow-for-invalid-VERSION-test-with-one-.patch deleted file mode 100644 index 596cefc571e91556bd32682b6b10ba57720fd4f7..0000000000000000000000000000000000000000 --- a/pcre2-10.35-Fix-read-overflow-for-invalid-VERSION-test-with-one-.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 4089a9d71445fbe48ce41dd5cb595dba88c18a26 Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Mon, 29 Jun 2020 15:35:49 +0000 -Subject: [PATCH] Fix read overflow for invalid VERSION test with one - fractional digit at the end of a pattern. Fixes ClusterFuzz 23779. -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@1266 6239d852-aaf2-0410-a92c-79f79f948069 -Petr Písař: Ported to 10.35. ---- - src/pcre2_compile.c | 1 + - testdata/testinput2 | 2 ++ - testdata/testoutput2 | 3 +++ - -diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c -index 136d583..e811f12 100644 ---- a/src/pcre2_compile.c -+++ b/src/pcre2_compile.c -@@ -4331,6 +4331,7 @@ while (ptr < ptrend) - { - if (++ptr >= ptrend || !IS_DIGIT(*ptr)) goto BAD_VERSION_CONDITION; - minor = (*ptr++ - CHAR_0) * 10; -+ if (ptr >= ptrend) goto BAD_VERSION_CONDITION; - if (IS_DIGIT(*ptr)) minor += *ptr++ - CHAR_0; - if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS) - goto BAD_VERSION_CONDITION; -diff --git a/testdata/testinput2 b/testdata/testinput2 -index c816c5f..47320eb 100644 ---- a/testdata/testinput2 -+++ b/testdata/testinput2 -@@ -5864,4 +5864,6 @@ a)"xI - /"(*MARK:>" 00 "<).(?C1)."/hex,mark,no_start_optimize - AB - -+/(?(VERSION=0.0/ -+ - # End of testinput2 -diff --git a/testdata/testoutput2 b/testdata/testoutput2 -index c90efef..c06363a 100644 ---- a/testdata/testoutput2 -+++ b/testdata/testoutput2 -@@ -17621,6 +17621,9 @@ Latest Mark: >\x00< - 0: AB - MK: >\x00< - -+/(?(VERSION=0.0/ -+Failed: error 179 at offset 14: syntax error or number too big in (?(VERSION condition -+ - # End of testinput2 - Error -70: PCRE2_ERROR_BADDATA (unknown error number) - Error -62: bad serialized data --- -2.25.4 - diff --git a/pcre2-10.35.tar.bz2 b/pcre2-10.35.tar.bz2 deleted file mode 100644 index b2731a18ce0402c570da475345a63380b80a371f..0000000000000000000000000000000000000000 Binary files a/pcre2-10.35.tar.bz2 and /dev/null differ diff --git a/pcre2-10.36.tar.bz2 b/pcre2-10.36.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..222b975125acf20e32c60a41446844febec4bb80 Binary files /dev/null and b/pcre2-10.36.tar.bz2 differ diff --git a/pcre2.spec b/pcre2.spec index f0552a138c92e79a51b1cd25e0d430fab97de4e9..fe393e30bad18dc98788242716762baf32fd7406 100644 --- a/pcre2.spec +++ b/pcre2.spec @@ -1,5 +1,5 @@ Name: pcre2 -Version: 10.35 +Version: 10.36 Release: 1 Summary: Perl Compatible Regular Expressions License: BSD @@ -7,18 +7,8 @@ URL: http://www.pcre.org/ Source0: https://ftp.pcre.org/pub/pcre/%{name}-%{version}.tar.bz2 # Do no set RPATH if libdir is not /usr/lib -Patch0: pcre2-10.10-Fix-multilib.patch -# 1/2 Enable shadow stack built-in functions if -fcf-protection compiler flag is -Patch1: pcre2-10.35-Apply-H.J.-Lu-s-patch-to-pass-mshstk-to-the-compiler.patch -# 2/2 Enable shadow stack built-in functions if -fcf-protection compiler flag is -Patch2: pcre2-10.35-Fix-previous-commit-include-CET_CFLAGS-in-16-bit-and.patch -# Fix an infinite loop when a single-byte newline is search in JIT if an -Patch3: pcre2-10.35-Fix-inifinite-loop-when-a-single-byte-newline-is-sea.patch -# Fix a buffer overread when parsing an unterminated VERSION condition with -# a single-digit minor number at the end of a regular expression, -Patch4: pcre2-10.35-Fix-read-overflow-for-invalid-VERSION-test-with-one-.patch -# Fix an early fail optimization with character ranges and a buffer overread -Patch5: pcre2-10.35-Fix-an-early-fail-optimization-issue-and-a-buffer-ov.patch +Patch0: backport-pcre2-10.10-Fix-multilib.patch +Patch1: backport-pcre2-10.36-Get-rid-of-gcc-fanalyzer-error-though-it-was-probabl.patch BuildRequires: autoconf libtool automake coreutils gcc make readline-devel Obsoletes: pcre2-utf16 pcre2-utf32 pcre2-tools @@ -135,6 +125,12 @@ make check %{_pkgdocdir}/html/ %changelog +* Thu Jan 21 2021 yixiangzhike - 10.36-1 +- Type:requirement +- ID:NA +- SUG:NA +- DESC:update to 10.36 + * Fri Jul 24 2020 zhangxingliang - 10.35-1 - Type:update - ID:NA