From add2e5d0f4d41922e29968a2ae5ba613c465ad26 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Fri, 29 Nov 1996 19:03:42 +0000 Subject: [PATCH] Check for error return from uiomove to prevent looping endlessly in soreceive(). Closes PR#2114. Submitted by: wpaul --- sys/kern/uipc_socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index da9e33146408..d359d5deb4ad 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 - * $Id: uipc_socket.c,v 1.19 1996/07/11 16:31:56 wollman Exp $ + * $Id: uipc_socket.c,v 1.20 1996/10/07 04:32:26 pst Exp $ */ #include @@ -708,6 +708,8 @@ soreceive(so, paddr, uio, mp0, controlp, flagsp) splx(s); error = uiomove(mtod(m, caddr_t) + moff, (int)len, uio); s = splnet(); + if (error) + goto release; } else uio->uio_resid -= len; if (len == m->m_len - moff) {