diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-04-13 19:12:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-04-13 19:12:45 +0000 |
commit | 16ceff19f9a7aa79cef5eadd507a8f702f8f1a22 (patch) | |
tree | 6822c843d86d742cd285dfce242a6310fa1663f0 /sys/kern | |
parent | 12c2ddbd2239348957b55e28e45e334f08be12a4 (diff) |
Do not clamp the file descriptors to the buffer size; that leads to
losing them.
ok claudio
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 98baba24e16..a832142876b 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.57 2012/04/13 09:38:32 deraadt Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.58 2012/04/13 19:12:44 deraadt Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -650,7 +650,7 @@ unp_externalize(struct mbuf *rights, socklen_t controllen) else controllen -= CMSG_ALIGN(sizeof(struct cmsghdr)); if (nfds > controllen / sizeof(int)) - nfds = controllen / sizeof(int); + return EMSGSIZE; rp = (struct file **)CMSG_DATA(cm); |