From e62f3078b7e25c4a2c583b9d6e6c839a9cca8628 Mon Sep 17 00:00:00 2001 From: basebuilder_pel7x64builder0 Date: Fri, 24 Aug 2018 00:51:56 +0200 Subject: [PATCH] pcre2 package update Signed-off-by: basebuilder_pel7x64builder0 --- SOURCES/pcre2-10.10-Fix-multilib.patch | 7 +-- ...23-Check-malloc-returns-in-pcre2test.patch | 47 ++++++++++--------- ...x-32-bit-non-UTF-property-test-crash.patch | 19 ++++---- SPECS/pcre2.spec | 1 + 4 files changed, 39 insertions(+), 35 deletions(-) diff --git a/SOURCES/pcre2-10.10-Fix-multilib.patch b/SOURCES/pcre2-10.10-Fix-multilib.patch index 917ec7bc..89c7d80c 100644 --- a/SOURCES/pcre2-10.10-Fix-multilib.patch +++ b/SOURCES/pcre2-10.10-Fix-multilib.patch @@ -16,7 +16,7 @@ index 932160e..dbef5e5 100644 +++ b/pcre2-config.in @@ -28,19 +28,7 @@ if test $# -eq 0; then fi - + libR= -case `uname -s` in - *SunOS*) @@ -31,8 +31,9 @@ index 932160e..dbef5e5 100644 -if test @libdir@ != /usr/lib ; then - libS=-L@libdir@ -fi - + while test $# -gt 0; do case "$1" in --- +-- 2.1.0 + diff --git a/SOURCES/pcre2-10.23-Check-malloc-returns-in-pcre2test.patch b/SOURCES/pcre2-10.23-Check-malloc-returns-in-pcre2test.patch index b553c782..d42232a2 100644 --- a/SOURCES/pcre2-10.23-Check-malloc-returns-in-pcre2test.patch +++ b/SOURCES/pcre2-10.23-Check-malloc-returns-in-pcre2test.patch @@ -28,63 +28,63 @@ index 241c22c..01457e8 100644 (test_mode == PCRE32_MODE && G(x,32)->f r (y))) - - -+ - ++ + /* ----- Two out of three modes are supported ----- */ - + @@ -1775,7 +1774,7 @@ the three different cases. */ #define TESTFLD(x,f,r,y) ( \ (test_mode == G(G(PCRE,BITONE),_MODE) && G(x,BITONE)->f r (y)) || \ (test_mode == G(G(PCRE,BITTWO),_MODE) && G(x,BITTWO)->f r (y))) - -+ - ++ + #endif /* Two out of three modes */ - + @@ -6169,7 +6168,16 @@ if ((pat_patctl.control & CTL_POSIX) != 0) if (msg[0] == 0) fprintf(outfile, "\n"); - + if (dat_datctl.oveccount > 0) -+ { ++ { pmatch = (regmatch_t *)malloc(sizeof(regmatch_t) * dat_datctl.oveccount); + if (pmatch == NULL) + { + fprintf(outfile, "** Failed to get memory for recording matching " + "information (size set = %du)\n", dat_datctl.oveccount); -+ return PR_OK; -+ } -+ } -+ ++ return PR_OK; ++ } ++ } ++ if ((dat_datctl.options & PCRE2_NOTBOL) != 0) eflags |= REG_NOTBOL; if ((dat_datctl.options & PCRE2_NOTEOL) != 0) eflags |= REG_NOTEOL; if ((dat_datctl.options & PCRE2_NOTEMPTY) != 0) eflags |= REG_NOTEMPTY; @@ -6305,6 +6313,14 @@ else PCRE2_MATCH_DATA_CREATE(match_data, max_oveccount, NULL); } - + +if (CASTVAR(void *, match_data) == NULL) + { + fprintf(outfile, "** Failed to get memory for recording matching " + "information (size requested: %d)\n", dat_datctl.oveccount); -+ max_oveccount = 0; -+ return PR_OK; -+ } ++ max_oveccount = 0; ++ return PR_OK; ++ } + /* Replacement processing is ignored for DFA matching. */ - + if (dat_datctl.replacement[0] != 0 && (dat_datctl.control & CTL_DFA) != 0) diff --git a/testdata/testinput2 b/testdata/testinput2 index a700d5a..921d83c 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -4969,4 +4969,7 @@ a)"xI - + /(?a)(?b)\g{b}\g{a}\g{a}\g{a}\g{a}(?xx)(?zz)/I,dupnames - + +// + \=ovector=7777777777 + - # End of testinput2 + # End of testinput2 diff --git a/testdata/testoutput2 b/testdata/testoutput2 index ce8c667..9862ea3 100644 --- a/testdata/testoutput2 @@ -92,13 +92,14 @@ index ce8c667..9862ea3 100644 @@ -15479,6 +15479,10 @@ First code unit = 'a' Last code unit = 'z' Subject length lower bound = 11 - + +// + \=ovector=7777777777 +** Invalid value in 'ovector=7777777777' + - # End of testinput2 + # End of testinput2 Error -63: PCRE2_ERROR_BADDATA (unknown error number) Error -62: bad serialized data --- +-- 2.7.4 + diff --git a/SOURCES/pcre2-10.23-Fix-32-bit-non-UTF-property-test-crash.patch b/SOURCES/pcre2-10.23-Fix-32-bit-non-UTF-property-test-crash.patch index 07e9a675..e9647ad0 100644 --- a/SOURCES/pcre2-10.23-Fix-32-bit-non-UTF-property-test-crash.patch +++ b/SOURCES/pcre2-10.23-Fix-32-bit-non-UTF-property-test-crash.patch @@ -16,13 +16,13 @@ index 6a8774c..720bbc9 100644 +++ b/src/pcre2_internal.h @@ -1774,10 +1774,17 @@ typedef struct { /* UCD access macros */ - + #define UCD_BLOCK_SIZE 128 -#define GET_UCD(ch) (PRIV(ucd_records) + \ +#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \ PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) - + +#if PCRE2_CODE_UNIT_WIDTH == 32 +#define GET_UCD(ch) ((ch > MAX_UTF_CODE_POINT)? \ + PRIV(dummy_ucd_record) : REAL_GET_UCD(ch)) @@ -58,9 +58,9 @@ index 116f537..56aa29d 100644 --- a/src/pcre2_ucd.c +++ b/src/pcre2_ucd.c @@ -41,6 +41,20 @@ const uint32_t PRIV(ucd_caseless_sets)[] = {0}; - + const char *PRIV(unicode_version) = "8.0.0"; - + +/* If the 32-bit library is run in non-32-bit mode, character values +greater than 0x10ffff may be encountered. For these we set up a +special record. */ @@ -83,9 +83,9 @@ index c3b2bfc..decfe82 100644 --- a/testdata/testinput12 +++ b/testdata/testinput12 @@ -360,4 +360,7 @@ - + /[\s[:^ascii:]]/B,ucp - + +/\pP/ucp + \x{7fffffff}\=no_jit + @@ -97,7 +97,7 @@ index 3b5a0cd..41e0a48 100644 @@ -1415,4 +1415,10 @@ No match End ------------------------------------------------------------------ - + +/\pP/ucp + \x{7fffffff}\=no_jit +** Character \x{7fffffff} is greater than 0xffff and UTF-16 mode is not enabled. @@ -112,11 +112,12 @@ index 1496159..e9130b9 100644 @@ -1409,4 +1409,8 @@ No match End ------------------------------------------------------------------ - + +/\pP/ucp + \x{7fffffff}\=no_jit +No match + # End of testinput12 --- +-- 2.7.4 + diff --git a/SPECS/pcre2.spec b/SPECS/pcre2.spec index cd531c4a..37285cea 100644 --- a/SPECS/pcre2.spec +++ b/SPECS/pcre2.spec @@ -357,3 +357,4 @@ make %{?_smp_mflags} check VERBOSE=yes * Fri Mar 13 2015 Petr Pisar - 10.10-1 - PCRE2 library packaged +