summaryrefslogtreecommitdiff
path: root/src/pcre2_intmodedep.h
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-05-11 16:49:58 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-05-11 16:49:58 +0000
commit89c86560874a8cfa422be7d2b22d18ed6e20635e (patch)
tree028f9ae6692ee1e43498f2c8bd26cf7455671e80 /src/pcre2_intmodedep.h
parent25aebdd07fb4de49d00d037586fb1770177662cc (diff)
downloadpcre2-89c86560874a8cfa422be7d2b22d18ed6e20635e.tar.gz
More refactoring for ovector addressing.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@780 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_intmodedep.h')
-rw-r--r--src/pcre2_intmodedep.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pcre2_intmodedep.h b/src/pcre2_intmodedep.h
index 6bc9c09..a05f312 100644
--- a/src/pcre2_intmodedep.h
+++ b/src/pcre2_intmodedep.h
@@ -637,7 +637,11 @@ typedef struct pcre2_real_code {
uint16_t name_count; /* Number of name entries in the table */
} pcre2_real_code;
-/* The real match data structure. */
+/* The real match data structure. Define ovector large so that array bound
+checkers don't grumble. Memory for this structure is obtained by calling
+pcre2_match_data_create(), which sets the size as the offset of ovector plus
+pairs of elements for each capturing group. (See also the heapframe structure
+below.) */
typedef struct pcre2_real_match_data {
pcre2_memctl memctl;
@@ -650,7 +654,7 @@ typedef struct pcre2_real_match_data {
uint16_t matchedby; /* Type of match (normal, JIT, DFA) */
uint16_t oveccount; /* Number of pairs */
int rc; /* The return code from the match */
- PCRE2_SIZE ovector[1]; /* The first field */
+ PCRE2_SIZE ovector[10000];/* The first field */
} pcre2_real_match_data;