1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

clear cmsg padding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-04-25 13:37:55 +00:00
parent e3b9378f38
commit 24af397fcd

View file

@ -1942,6 +1942,7 @@ unix_send_io(VALUE sock, VALUE val)
msg.msg_control = (caddr_t)&cmsg;
msg.msg_controllen = CMSG_LEN(sizeof(int));
msg.msg_flags = 0;
MEMZERO((char*)&cmsg, char, sizeof(cmsg));
cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int));
cmsg.hdr.cmsg_level = SOL_SOCKET;
cmsg.hdr.cmsg_type = SCM_RIGHTS;