summaryrefslogtreecommitdiffstats
path: root/lib/libutil/imsg-buffer.c
diff options
context:
space:
mode:
authorbrynet <brynet@openbsd.org>2015-07-03 14:50:14 +0000
committerbrynet <brynet@openbsd.org>2015-07-03 14:50:14 +0000
commit7ab148026b8fbb108115dc8f7dc021e087d7b35e (patch)
treef5dfc2151d34db33b38021fd321a020d034455d8 /lib/libutil/imsg-buffer.c
parentFix cast in atomic_swap_ptr() (diff)
downloadwireguard-openbsd-7ab148026b8fbb108115dc8f7dc021e087d7b35e.tar.xz
wireguard-openbsd-7ab148026b8fbb108115dc8f7dc021e087d7b35e.zip
bzero cmsgbuf before using it, silences valgrind warnings.
henning@ "sure"
Diffstat (limited to 'lib/libutil/imsg-buffer.c')
-rw-r--r--lib/libutil/imsg-buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libutil/imsg-buffer.c b/lib/libutil/imsg-buffer.c
index 318f9184998..00e03b9d1b9 100644
--- a/lib/libutil/imsg-buffer.c
+++ b/lib/libutil/imsg-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg-buffer.c,v 1.5 2014/12/25 22:20:52 benno Exp $ */
+/* $OpenBSD: imsg-buffer.c,v 1.6 2015/07/03 14:50:14 brynet Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -235,6 +235,7 @@ msgbuf_write(struct msgbuf *msgbuf)
bzero(&iov, sizeof(iov));
bzero(&msg, sizeof(msg));
+ bzero(&cmsgbuf, sizeof(cmsgbuf));
TAILQ_FOREACH(buf, &msgbuf->bufs, entry) {
if (i >= IOV_MAX)
break;