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/20191107.042334~145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d578f9bf0b338d47a7e1c88ca7a36da2a1f0e141;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 aca0ca55f3..083890020a 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -667,7 +667,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;