From bea3a10a9302ab0130c19371ecb19b57864e287a Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Tue, 14 Feb 2017 10:40:33 +0000 Subject: [PATCH] Final file updates for 10.23. --- ChangeLog | 30 +++++++++++++++--------------- NEWS | 4 ++-- configure.ac | 4 ++-- src/config.h.generic | 6 +++--- src/pcre2.h | 4 ++-- src/pcre2.h.generic | 4 ++-- src/pcre2_compile.c | 14 +++++++------- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index df45dcc..70ecb9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -219,7 +219,7 @@ compliant and unique. wrong name. 27. In pcre2test, give some offset information for errors in hex patterns. -This uses the C99 formatting sequence %td, except for MSVC which doesn't +This uses the C99 formatting sequence %td, except for MSVC which doesn't support it - %lu is used instead. 28. Implemented pcre2_code_copy_with_tables(), and added pushtablescopy to @@ -338,23 +338,23 @@ modules. * LC_ALL was displayed as "LCC_ALL"; * numbers 11, 12 & 13 should end in "th"; * use double quotes in usage message. - -53. When autopossessifying, skip empty branches without recursion, to reduce -stack usage for the benefit of clang with -fsanitize-address, which uses huge -stack frames. Example pattern: /X?(R||){3335}/. Fixes oss-fuzz issue 553. -54. A pattern with very many explicit back references to a group that is a long -way from the start of the pattern could take a long time to compile because -searching for the referenced group in order to find the minimum length was -being done repeatedly. Now up to 128 group minimum lengths are cached and the -attempt to find a minimum length is abandoned if there is a back reference to a -group whose number is greater than 128. (In that case, the pattern is so -complicated that this optimization probably isn't worth it.) This fixes +53. When autopossessifying, skip empty branches without recursion, to reduce +stack usage for the benefit of clang with -fsanitize-address, which uses huge +stack frames. Example pattern: /X?(R||){3335}/. Fixes oss-fuzz issue 553. + +54. A pattern with very many explicit back references to a group that is a long +way from the start of the pattern could take a long time to compile because +searching for the referenced group in order to find the minimum length was +being done repeatedly. Now up to 128 group minimum lengths are cached and the +attempt to find a minimum length is abandoned if there is a back reference to a +group whose number is greater than 128. (In that case, the pattern is so +complicated that this optimization probably isn't worth it.) This fixes oss-fuzz issue 557. -55. Issue 32 for 10.22 below was not correctly fixed. If pcre2grep in multiline -mode with --only-matching matched several lines, it restarted scanning at the -next line instead of moving on to the end of the matched string, which can be +55. Issue 32 for 10.22 below was not correctly fixed. If pcre2grep in multiline +mode with --only-matching matched several lines, it restarted scanning at the +next line instead of moving on to the end of the matched string, which can be several lines after the start. 56. Applied Jason Hood's new patch for RunGrepTest.bat that updates it in line diff --git a/NEWS b/NEWS index 74215cd..08798bb 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,8 @@ News about PCRE2 releases ------------------------- -Version 10.23 16-January-2017 ------------------------------ +Version 10.23 14-February-2017 +------------------------------ 1. ChangeLog has the details of a lot of bug fixes and tidies. diff --git a/configure.ac b/configure.ac index 33c1fa7..90f6d03 100644 --- a/configure.ac +++ b/configure.ac @@ -10,8 +10,8 @@ dnl be defined as -RC2, for example. For real releases, it should be empty. m4_define(pcre2_major, [10]) m4_define(pcre2_minor, [23]) -m4_define(pcre2_prerelease, [-RC1]) -m4_define(pcre2_date, [2017-01-16]) +m4_define(pcre2_prerelease, []) +m4_define(pcre2_date, [2017-02-14]) # NOTE: The CMakeLists.txt file searches for the above variables in the first # 50 lines of this file. Please update that if the variables above are moved. diff --git a/src/config.h.generic b/src/config.h.generic index afebddf..3315b77 100644 --- a/src/config.h.generic +++ b/src/config.h.generic @@ -212,7 +212,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_NAME "PCRE2" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE2 10.23-RC1" +#define PACKAGE_STRING "PCRE2 10.23" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcre2" @@ -221,7 +221,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "10.23-RC1" +#define PACKAGE_VERSION "10.23" /* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested parentheses (of any kind) in a pattern. This limits the amount of system @@ -336,7 +336,7 @@ sure both macros are undefined; an emulation function will then be used. */ #endif /* Version number of package */ -#define VERSION "10.23-RC1" +#define VERSION "10.23" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/src/pcre2.h b/src/pcre2.h index 5f1c0ed..8650320 100644 --- a/src/pcre2.h +++ b/src/pcre2.h @@ -43,8 +43,8 @@ POSSIBILITY OF SUCH DAMAGE. #define PCRE2_MAJOR 10 #define PCRE2_MINOR 23 -#define PCRE2_PRERELEASE -RC1 -#define PCRE2_DATE 2017-01-16 +#define PCRE2_PRERELEASE +#define PCRE2_DATE 2017-02-14 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE2, the appropriate diff --git a/src/pcre2.h.generic b/src/pcre2.h.generic index 5f1c0ed..8650320 100644 --- a/src/pcre2.h.generic +++ b/src/pcre2.h.generic @@ -43,8 +43,8 @@ POSSIBILITY OF SUCH DAMAGE. #define PCRE2_MAJOR 10 #define PCRE2_MINOR 23 -#define PCRE2_PRERELEASE -RC1 -#define PCRE2_DATE 2017-01-16 +#define PCRE2_PRERELEASE +#define PCRE2_DATE 2017-02-14 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE2, the appropriate diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 4475236..6d98a68 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -1226,14 +1226,14 @@ if (allow_sign >= 0 && ptr < ptrend) { sign = +1; max_value -= allow_sign; - ptr++; + ptr++; } else if (*ptr == CHAR_MINUS) - { - sign = -1; - ptr++; - } - } + { + sign = -1; + ptr++; + } + } if (ptr >= ptrend || !IS_DIGIT(*ptr)) return FALSE; while (ptr < ptrend && IS_DIGIT(*ptr)) @@ -2384,7 +2384,7 @@ while (ptr < ptrend) /* This is the length in characters */ verbnamelength = (PCRE2_SIZE)(parsed_pattern - verblengthptr - 1); /* But the limit on the length is in code units */ - if (ptr - verbnamestart - 1 > MAX_MARK) + if (ptr - verbnamestart - 1 > (int)MAX_MARK) { ptr--; errorcode = ERR76;