Check for error return from uiomove to prevent looping endlessly in

soreceive(). Closes PR#2114.

Submitted by:	wpaul
This commit is contained in:
David Greenman 1996-11-29 19:03:42 +00:00
parent e6eeb36daf
commit add2e5d0f4

View File

@ -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 <sys/param.h>
@ -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) {