summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-04-13 19:16:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-04-13 19:16:12 +0000
commite0a31b2ec4abf89513a90f4c9f0311c5b0bcebc6 (patch)
tree06cbdbd9b5b9461b1389d4b85dbc5d59f3466e32 /sys
parent16ceff19f9a7aa79cef5eadd507a8f702f8f1a22 (diff)
oops, wrong version of diff in previous
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_usrreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index a832142876b..c8c37890a2e 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.58 2012/04/13 19:12:44 deraadt Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.59 2012/04/13 19:16:11 deraadt Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -649,8 +649,10 @@ unp_externalize(struct mbuf *rights, socklen_t controllen)
controllen = 0;
else
controllen -= CMSG_ALIGN(sizeof(struct cmsghdr));
- if (nfds > controllen / sizeof(int))
- return EMSGSIZE;
+ if (nfds > controllen / sizeof(int)) {
+ error = EMSGSIZE;
+ goto restart;
+ }
rp = (struct file **)CMSG_DATA(cm);