summaryrefslogtreecommitdiff
path: root/regerror.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-19 15:03:26 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-19 15:03:26 +0000
commitc3fd3191fc9801b43daa0125d1df1ced383011b8 (patch)
tree501ae1d112a98c224e69c269aa04ba1ea6f715ad /regerror.c
parent661148ad9efac4c2701e0e540323fd487e75d5bf (diff)
merge r46831 partially. extracted commits are as follows.
https://github.com/k-takata/Onigmo/commit/b9fba1dc63ccb42a86e934011b468e6022fabb74 https://github.com/k-takata/Onigmo/commit/c1fc76b9bd463948ffc5058bc352bf93732f0314 https://github.com/k-takata/Onigmo/commit/a0efc0a200f7108ca3d5ac3039c8f952e0051619 https://github.com/k-takata/Onigmo/commit/c7cda4ed5676167b0d01bb5555724f6164fbdb13 [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_1@47223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regerror.c')
-rw-r--r--regerror.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/regerror.c b/regerror.c
index 9c94d23018..d32b50d12b 100644
--- a/regerror.c
+++ b/regerror.c
@@ -133,6 +133,8 @@ onig_error_code_to_format(OnigPosition code)
p = "too short multibyte code string"; break;
case ONIGERR_TOO_BIG_BACKREF_NUMBER:
p = "too big backref number"; break;
+ case ONIGERR_TOO_MANY_CAPTURE_GROUPS:
+ p = "too many capture groups are specified"; break;
case ONIGERR_INVALID_BACKREF:
#ifdef USE_NAMED_GROUP
p = "invalid backref number/name"; break;