diff options
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; |