From 62712056266fb88e15caa9357ac2b1fe0038c949 Mon Sep 17 00:00:00 2001 From: Guy Zana <guy@cloudius-systems.com> Date: Tue, 21 May 2013 17:17:35 +0300 Subject: [PATCH] bsd: zero a few uninitialized structures this haven't caused a real bug, I just noticed it while tracing. it may be dangerous if in some flow, the stack will not be zeroed --- bsd/sys/kern/uipc_syscalls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsd/sys/kern/uipc_syscalls.c b/bsd/sys/kern/uipc_syscalls.c index fa92e3ca9..cfb3c1f1c 100644 --- a/bsd/sys/kern/uipc_syscalls.c +++ b/bsd/sys/kern/uipc_syscalls.c @@ -495,7 +495,7 @@ kern_sendit(int s, ssize_t *bytes) { struct file *fp; - struct uio auio; + struct uio auio = {}; struct iovec *iov; struct socket *so; struct bsd_sockaddr *from = 0; @@ -548,8 +548,8 @@ int sys_sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen, ssize_t* bytes) { - struct msghdr msg; - struct iovec aiov; + struct msghdr msg = {}; + struct iovec aiov = {}; int error; msg.msg_name = to; -- GitLab