diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-25 13:37:55 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-25 13:37:55 +0000 |
commit | 24af397fcdc96219ab4fc110d48aba7fad79a34f (patch) | |
tree | 01f49c10aa4d6c2a561e3861733f62e827de59c7 /ext/socket | |
parent | e3b9378f38e0ddc038b7a3032c115eebf9bec75a (diff) | |
download | ruby-24af397fcdc96219ab4fc110d48aba7fad79a34f.tar.gz |
clear cmsg padding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 5591ad46a9..a69baac7bb 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -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; |