diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-10 08:03:47 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-10 08:03:47 +0000 |
commit | 83fc324d1dfb2bec7d683509e25e3cc17dbecf18 (patch) | |
tree | 33815d2e1045fe3862f9dbcecac309eb2915cf09 /test/openssl | |
parent | 91db3b6c6b0daff732c0bacfcc4db397f1df4a42 (diff) |
ext/openssl/ossl_bn.c (ossl_bn_initialize): get rid of SEGV
OpenSSL::BN.new(nil, 2) dumped core.
[ruby-core:92231] [Bug #15760]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-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 |