From: Jaehoon Chung Date: Mon, 10 Apr 2017 10:39:51 +0000 (+0900) Subject: net: nfs: fix the regression when nfs_read_reply() is called X-Git-Tag: submit/tizen/20211123.233157~298 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9364706f5c07ed93b84c62f259b3a9b497e92da3;p=platform%2Fkernel%2Fu-boot.git net: nfs: fix the regression when nfs_read_reply() is called When nfs_read_reply() is called, it should be stucked in memcpy(). size of rpc_pkt.u.reply() might be too bigger. Change from 'sizeof(rpc_pkt.u.reply)' to 'len'. Signed-off-by: Jaehoon Chung --- diff --git a/net/nfs.c b/net/nfs.c index 70d0e08bde..c6c400bb5b 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -672,7 +672,7 @@ static int nfs_read_reply(uchar *pkt, unsigned len) debug("%s\n", __func__); - memcpy(&rpc_pkt.u.data[0], pkt, sizeof(rpc_pkt.u.reply)); + memcpy(&rpc_pkt.u.data[0], pkt, len); if (ntohl(rpc_pkt.u.reply.id) > rpc_id) return -NFS_RPC_ERR;