summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-15 16:19:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-15 16:19:03 +0000
commit4e21997d99bba966cb7bcf94c8c986448d4b6d75 (patch)
treef3d05dfdca189fb3e47b22d7c23255188cb44ab7 /lib
parentbb6875f015e972c353dac4616e93affe94d56162 (diff)
Repair the simple cases for msg_controllen where it should just be
CMSG_SIZE(sizeof(int)), not sizeof(buffer) which may be larger because of alignment; ok kettenis hshoexer
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/auth_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c
index 0f4457e7bc1..405215c7216 100644
--- a/lib/libc/gen/auth_subr.c
+++ b/lib/libc/gen/auth_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth_subr.c,v 1.33 2008/03/13 01:49:52 deraadt Exp $ */
+/* $OpenBSD: auth_subr.c,v 1.34 2008/03/15 16:19:02 deraadt Exp $ */
/*
* Copyright (c) 2000-2002,2004 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -995,7 +995,7 @@ _recv_fd(auth_session_t *as, int fd)
memset(&msg, 0, sizeof(msg));
msg.msg_control = &cmsgbuf.buf;
- msg.msg_controllen = sizeof(cmsgbuf.buf);
+ msg.msg_controllen = CMSG_LEN(sizeof(int));
if (recvmsg(fd, &msg, 0) < 0)
syslog(LOG_ERR, "recvmsg: %m");
else if (msg.msg_flags & MSG_TRUNC)