summaryrefslogtreecommitdiffstats
path: root/thirdparty/pcre2/src/pcre2_convert.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/pcre2/src/pcre2_convert.c')
-rw-r--r--thirdparty/pcre2/src/pcre2_convert.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/thirdparty/pcre2/src/pcre2_convert.c b/thirdparty/pcre2/src/pcre2_convert.c
index 36466e4b91..fe396ae4f9 100644
--- a/thirdparty/pcre2/src/pcre2_convert.c
+++ b/thirdparty/pcre2/src/pcre2_convert.c
@@ -540,6 +540,14 @@ Returns: !0 => character is found in the class
static BOOL
convert_glob_char_in_class(int class_index, PCRE2_UCHAR c)
{
+#if PCRE2_CODE_UNIT_WIDTH != 8
+if (c > 0xff)
+ {
+ /* ctype functions are not sane for c > 0xff */
+ return 0;
+ }
+#endif
+
switch (class_index)
{
case 1: return isalnum(c);