summaryrefslogtreecommitdiff
path: root/src/pcre2_intmodedep.h
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-09-10 13:22:08 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-09-10 13:22:08 +0000
commit2f211cde4ba45a9827eae1d00b13c179ba658aa5 (patch)
tree2bdfeaa897ab5669db2fcd21ff137885062b5935 /src/pcre2_intmodedep.h
parent9812e792bc5375dcfb460462a77101f78eee4b4d (diff)
downloadpcre2-2f211cde4ba45a9827eae1d00b13c179ba658aa5.tar.gz
Mend bug introduced in previous patch. Fixes crash detected by ClusterFuzz
17101. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1169 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_intmodedep.h')
-rw-r--r--src/pcre2_intmodedep.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pcre2_intmodedep.h b/src/pcre2_intmodedep.h
index b03d5c2..15ade47 100644
--- a/src/pcre2_intmodedep.h
+++ b/src/pcre2_intmodedep.h
@@ -205,19 +205,19 @@ whether its argument, which is assumed to be one code unit, is less than 256.
The CHMAX_255 macro does not assume one code unit. The maximum length of a MARK
name must fit in one code unit; currently it is set to 255 or 65535. The
TABLE_GET macro is used to access elements of tables containing exactly 256
-items. When code points can be greater than 255, a check is needed before
-accessing these tables. */
+items. Its argument is a code unit. When code points can be greater than 255, a
+check is needed before accessing these tables. */
#if PCRE2_CODE_UNIT_WIDTH == 8
#define MAX_255(c) TRUE
#define MAX_MARK ((1u << 8) - 1)
+#define TABLE_GET(c, table, default) ((table)[c])
#ifdef SUPPORT_UNICODE
#define SUPPORT_WIDE_CHARS
#define CHMAX_255(c) ((c) <= 255u)
#else
#define CHMAX_255(c) TRUE
#endif /* SUPPORT_UNICODE */
-#define TABLE_GET(c, table, default) ((table)[c])
#else /* Code units are 16 or 32 bits */
#define CHMAX_255(c) ((c) <= 255u)
@@ -228,7 +228,6 @@ accessing these tables. */
#endif
-
/* ----------------- Character-handling macros ----------------- */
/* There is a proposed future special "UTF-21" mode, in which only the lowest