patch-1.3.21 linux/net/core/iovec.c
Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/core/datagram.c
Back to the patch index
Back to the overall index
- Lines: 14
- Date:
Mon Aug 28 10:39:06 1995
- Orig file:
v1.3.20/linux/net/core/iovec.c
- Orig date:
Tue Aug 8 12:31:43 1995
diff -u --recursive --new-file v1.3.20/linux/net/core/iovec.c linux/net/core/iovec.c
@@ -64,9 +64,10 @@
{
while(len>0)
{
- memcpy_tofs(iov->iov_base, kdata,iov->iov_len);
- kdata+=iov->iov_len;
- len-=iov->iov_len;
+ int copy = min(iov->iov_len,len);
+ memcpy_tofs(iov->iov_base,kdata,copy);
+ kdata+=copy;
+ len-=copy;
iov++;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this