diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-13 07:33:10 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-13 07:33:10 +0000 |
commit | c5f1c9e222864fc1858d48463802bb383d1ff1aa (patch) | |
tree | 55e819c88175be91ad95054f82e7f2eb4154ff23 /test | |
parent | cb915c9456b4d4dee9604129556de38715eed1b7 (diff) |
merge revision(s) 67497,67498: [Backport #15760]
ext/openssl/ossl_bn.c (ossl_bn_initialize): get rid of SEGV
OpenSSL::BN.new(nil, 2) dumped core.
[ruby-core:92231] [Bug #15760]
* expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_bn.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/openssl/test_bn.rb b/test/openssl/test_bn.rb index 274afba3bb..0b5cd84241 100644 --- a/test/openssl/test_bn.rb +++ b/test/openssl/test_bn.rb @@ -272,6 +272,11 @@ class OpenSSL::TestBN < OpenSSL::TestCase assert_equal(0, @e1.ucmp(-999)) assert_instance_of(String, @e1.hash.to_s) end + + def test_type_error + bug15760 = '[ruby-core:92231] [Bug #15760]' + assert_raise(TypeError, bug15760) { OpenSSL::BN.new(nil, 2) } + end end end |