summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/pcre2/src/pcre2_compile.c
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-12-04 16:45:55 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-12-07 15:22:43 +0100
commit509c25752112583e6bc997e8c9442f6b69136816 (patch)
treeba89fdcf7f57f348c8ce4deee403f7cdacb3c466 /src/3rdparty/pcre2/src/pcre2_compile.c
parent4be6663cf2d3fc3d4df295f909bae722b2673c05 (diff)
PCRE: update to 10.36
Dropped the RTEMS patch (upstream now uses posix_madvise). Drop support for the TILE architecture (dropped by upstream). [ChangeLog][Third-Party Code] PCRE2 has been updated to version 10.36. Pick-to: 6.0 5.15 Change-Id: Idb4467bef0ff520605b8b5d9188b9d67d8e4d0f2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/3rdparty/pcre2/src/pcre2_compile.c')
-rw-r--r--src/3rdparty/pcre2/src/pcre2_compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rdparty/pcre2/src/pcre2_compile.c b/src/3rdparty/pcre2/src/pcre2_compile.c
index 62393bea74..e811f12f02 100644
--- a/src/3rdparty/pcre2/src/pcre2_compile.c
+++ b/src/3rdparty/pcre2/src/pcre2_compile.c
@@ -2344,7 +2344,7 @@ if (ptr > *nameptr + MAX_NAME_SIZE)
*errorcodeptr = ERR48;
goto FAILED;
}
-*namelenptr = ptr - *nameptr;
+*namelenptr = (uint32_t)(ptr - *nameptr);
/* Subpattern names must not be empty, and their terminator is checked here.
(What follows a verb or alpha assertion name is checked separately.) */
@@ -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;