From 9364706f5c07ed93b84c62f259b3a9b497e92da3 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Mon, 10 Apr 2017 19:39:51 +0900 Subject: [PATCH] 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 --- net/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1