iovec: make sure the caller actually wants anything in memcpy_fromiovecend
authorSasha Levin <sasha.levin@oracle.com>
Fri, 1 Aug 2014 03:00:35 +0000 (23:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Aug 2014 00:42:36 +0000 (08:42 +0800)
commit8fbbef088e95f015f89cc155a02fe64017905765
treef67cb337d573bf9acb474dc48971265dfc8a9e0a
parent80db1671bd9bf67acf9c3b21350442b4b77e7cc4
iovec: make sure the caller actually wants anything in memcpy_fromiovecend

[ Upstream commit 06ebb06d49486676272a3c030bfeef4bd969a8e6 ]

Check for cases when the caller requests 0 bytes instead of running off
and dereferencing potentially invalid iovecs.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/iovec.c