summaryrefslogtreecommitdiffstats
path: root/libexec/tftp-proxy
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-03-15 16:24:58 +0000
committerderaadt <deraadt@openbsd.org>2008-03-15 16:24:58 +0000
commitab3651eb083efd2fd0cb3b11f10d41dbb487ef9c (patch)
treefd47f396f559c0b803955fd8f5e0f6fd5f509c65 /libexec/tftp-proxy
parentrepair msg_controllen and also an errant buf[CMSG_LEN(..)] decl (diff)
downloadwireguard-openbsd-ab3651eb083efd2fd0cb3b11f10d41dbb487ef9c.tar.xz
wireguard-openbsd-ab3651eb083efd2fd0cb3b11f10d41dbb487ef9c.zip
Repair more msg_controllen dealing with structures or arrays of
descriptors; ok hshoexer, also looked at by kettenis and henning
Diffstat (limited to 'libexec/tftp-proxy')
-rw-r--r--libexec/tftp-proxy/tftp-proxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/tftp-proxy/tftp-proxy.c b/libexec/tftp-proxy/tftp-proxy.c
index 372731b1c3d..af1b35dbd69 100644
--- a/libexec/tftp-proxy/tftp-proxy.c
+++ b/libexec/tftp-proxy/tftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftp-proxy.c,v 1.3 2008/03/13 01:49:52 deraadt Exp $
+/* $OpenBSD: tftp-proxy.c,v 1.4 2008/03/15 16:25:00 deraadt Exp $
*
* Copyright (c) 2005 DLS Internet Services
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@@ -164,7 +164,7 @@ main(int argc, char *argv[])
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = &cmsgbuf.buf;
- msg.msg_controllen = sizeof(cmsgbuf.buf);
+ msg.msg_controllen = CMSG_LEN(sizeof(struct sockaddr_storage));
if (recvmsg(fd, &msg, 0) < 0) {
syslog(LOG_ERR, "recvmsg: %m");