From 187689528f024dba849d651464f0ab06648b9d49 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 537d4c62de..f092750599 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -719,7 +719,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