diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 04:42:09 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 04:42:09 +0000 |
commit | cad94dbe222bb3337bfabefb66d5fb05d28dc133 (patch) | |
tree | 20be0655bbd4690acd30c11f6db7c7c8a6d9ceae /include | |
parent | b9e630607ed20bd35adf75faee325d88654c42e4 (diff) |
merge r46831 partially. these changes are from:
https://github.com/k-takata/Onigmo/commit/7abd7b29481f98eb92be786e3d33611fc7d000a0
[Bug #8716]
* include/ruby/oniguruma.h (ONIG_MAX_CAPTURE_GROUP_NUM,
ONIGERR_TOO_MANY_CAPTURE_GROUPS): add cheking the number of capture
groups.
* regerror.c (onig_error_code_to_format): ditto.
* regparse.c (scan_env_add_mem_entry): ditto.
* regexec.c (onig_region_copy, match_at): fix: segmation fault occurs
when many groups are used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/oniguruma.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index 0b645bd935..cdc4382596 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -340,6 +340,7 @@ int onigenc_str_bytelen_null P_((OnigEncoding enc, const OnigUChar* p)); /* config parameters */ #define ONIG_NREGION 10 #define ONIG_MAX_BACKREF_NUM 1000 +#define ONIG_MAX_CAPTURE_GROUP_NUM 32767 #define ONIG_MAX_REPEAT_NUM 100000 #define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000 /* constants */ @@ -584,6 +585,7 @@ ONIG_EXTERN const OnigSyntaxType* OnigDefaultSyntax; #define ONIGERR_NEVER_ENDING_RECURSION -221 #define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222 #define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223 +#define ONIGERR_TOO_MANY_CAPTURE_GROUPS -224 #define ONIGERR_INVALID_CODE_POINT_VALUE -400 #define ONIGERR_INVALID_WIDE_CHAR_VALUE -400 #define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401 |