* regparse.c (fetch_token_in_cc): raise error if given octal escaped

character is too big. [Bug #12420] [Bug #12423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2016-05-25 09:45:22 +00:00
parent cf2792d591
commit 05c631eefd
3 changed files with 8 additions and 1 deletions

View file

@ -439,6 +439,8 @@ class TestRegexp < Test::Unit::TestCase
assert_equal(arg_encoding_none, Regexp.new("", nil, "N").options)
assert_raise(RegexpError) { Regexp.new(")(") }
assert_raise(RegexpError) { Regexp.new('[\\40000000000') }
assert_raise(RegexpError) { Regexp.new('[\\600000000000.') }
end
def test_unescape