summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-12 16:00:03 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-12 16:00:03 +0000
commit91ff87c05df679b84ba4c537a71b10cd9e2b9613 (patch)
tree62a24bb3648bfde88da9ba2f297cedb950f32b5f /test
parent73757753aef81b97b69a82ccbbcdd7fcfafc6e16 (diff)
downloadruby-91ff87c05df679b84ba4c537a71b10cd9e2b9613.tar.gz
* ext/socket/socket.c (sock_s_unpack_sockaddr_in): check too short
sockaddr. (sock_s_unpack_sockaddr_un): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/socket/test_socket.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 4055c825c9..e35cedbbc1 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -93,6 +93,8 @@ class TestSocket < Test::Unit::TestCase
assert_raise(ArgumentError) { Socket.unpack_sockaddr_un(sockaddr_in) }
sockaddr_un = Socket.sockaddr_un("/tmp/s")
assert_raise(ArgumentError) { Socket.unpack_sockaddr_in(sockaddr_un) }
+ assert_raise(ArgumentError) { Socket.unpack_sockaddr_in("") }
+ assert_raise(ArgumentError) { Socket.unpack_sockaddr_un("") }
end if Socket.respond_to?(:sockaddr_un)
def test_sysaccept