diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-02-19 22:35:50 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-02-19 22:35:50 +0000 |
commit | e3aa9cf9df1a02648cfcb25900d151c2d128db73 (patch) | |
tree | 003a2634b408b85378780981e69730498691b22f /src/libunixonacid/unixmessage_sender_flush.c | |
parent | 73783574792a8dc9538b0e20cd61f3177124f897 (diff) | |
download | skalibs-e3aa9cf9df1a02648cfcb25900d151c2d128db73.tar.xz |
- Bugfix: unixmessage_sender_init didn't initialize b->shorty
- byte_zero the ancilbuf's padding to appease valgrind
Diffstat (limited to 'src/libunixonacid/unixmessage_sender_flush.c')
-rw-r--r-- | src/libunixonacid/unixmessage_sender_flush.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libunixonacid/unixmessage_sender_flush.c b/src/libunixonacid/unixmessage_sender_flush.c index b0ad2c9..75412fb 100644 --- a/src/libunixonacid/unixmessage_sender_flush.c +++ b/src/libunixonacid/unixmessage_sender_flush.c @@ -8,6 +8,7 @@ #include <errno.h> #include <skalibs/uint16.h> #include <skalibs/uint32.h> +#include <skalibs/bytestr.h> #include <skalibs/diuint.h> #include <skalibs/allreadwrite.h> #include <skalibs/genalloc.h> @@ -82,6 +83,7 @@ int unixmessage_sender_flush (unixmessage_sender_t *b) { struct cmsghdr *cp = CMSG_FIRSTHDR(&hdr) ; register unsigned int i = 0 ; + byte_zero(ancilbuf, sizeof(ancilbuf)) ; cp->cmsg_level = SOL_SOCKET ; cp->cmsg_type = SCM_RIGHTS ; cp->cmsg_len = CMSG_LEN(nfds * sizeof(int)) ; |