diff options
author | 2016-09-03 11:13:36 +0000 | |
---|---|---|
committer | 2016-09-03 11:13:36 +0000 | |
commit | bcca95331c97e9993b5d137765f5ccadf86baa16 (patch) | |
tree | 1a8eabbfb3aa4cc156f9a4cfd1ba8f5cc689dd9c | |
parent | convert to use readpassphrase() instead of DEPRECATED/getpass() (diff) | |
download | wireguard-openbsd-bcca95331c97e9993b5d137765f5ccadf86baa16.tar.xz wireguard-openbsd-bcca95331c97e9993b5d137765f5ccadf86baa16.zip |
Return immediately when m_getuio() fails by invalid uio parameter.
ok mikeb bluhm claudio
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 676d9b315e5..952c960dfd7 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.155 2016/08/25 14:13:19 bluhm Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.156 2016/09/03 11:13:36 yasuoka Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -488,6 +488,8 @@ restart: } else { error = m_getuio(&top, atomic, space, uio); + if (error) + goto release; space -= top->m_pkthdr.len; resid = uio->uio_resid; if (flags & MSG_EOR) |