summaryrefslogtreecommitdiff
path: root/pcre_ucd.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2017-02-24 17:30:30 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2017-02-24 17:30:30 +0000
commit8037f71d03b3cd8919248f38448a0a2d3715c18c (patch)
tree0fb6d719cb178fa234f4acc0029c5b0a38b5ec50 /pcre_ucd.c
parente7991eb5273b5b4162656f4b3d32e68a7430805a (diff)
downloadpcre-8037f71d03b3cd8919248f38448a0a2d3715c18c.tar.gz
Fix Unicode property crash for 32-bit characters greater than 0x10ffff.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1688 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_ucd.c')
-rw-r--r--pcre_ucd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pcre_ucd.c b/pcre_ucd.c
index 69c4fd4..f22f826 100644
--- a/pcre_ucd.c
+++ b/pcre_ucd.c
@@ -38,6 +38,20 @@ const pcre_uint16 PRIV(ucd_stage2)[] = {0};
const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0};
#else
+/* 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. */
+
+#ifdef COMPILE_PCRE32
+const ucd_record PRIV(dummy_ucd_record)[] = {{
+ ucp_Common, /* script */
+ ucp_Cn, /* type unassigned */
+ ucp_gbOther, /* grapheme break property */
+ 0, /* case set */
+ 0, /* other case */
+ }};
+#endif
+
/* When recompiling tables with a new Unicode version, please check the
types in this structure definition from pcre_internal.h (the actual
field names will be different):