summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-15 16:25:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-15 16:25:01 +0000
commit8332edeb582077739f86f898af5876386fbefc00 (patch)
tree0bd3f1a3f041252e7c1653278f43184cce9771a3 /usr.sbin/relayd
parent76cd87afedab46927375dd0ceabdedd0d5d56714 (diff)
Repair more msg_controllen dealing with structures or arrays of
descriptors; ok hshoexer, also looked at by kettenis and henning
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r--usr.sbin/relayd/imsg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/relayd/imsg.c b/usr.sbin/relayd/imsg.c
index 5915b1fcdb3..d42dc9c252f 100644
--- a/usr.sbin/relayd/imsg.c
+++ b/usr.sbin/relayd/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.12 2008/03/13 01:49:53 deraadt Exp $ */
+/* $OpenBSD: imsg.c,v 1.13 2008/03/15 16:25:00 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -68,7 +68,7 @@ imsg_read(struct imsgbuf *ibuf)
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(int) * 16);
if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) {
if (errno != EINTR && errno != EAGAIN) {