summaryrefslogtreecommitdiff
path: root/net/nfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfs.c')
-rw-r--r--net/nfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/nfs.c b/net/nfs.c
index b7cf3b3a18..11941fad1a 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -701,6 +701,9 @@ static int nfs_read_reply(uchar *pkt, unsigned len)
&(rpc_pkt.u.reply.data[4 + nfsv3_data_offset]);
}
+ if (((uchar *)&(rpc_pkt.u.reply.data[0]) - (uchar *)(&rpc_pkt) + rlen) > len)
+ return -9999;
+
if (store_block(data_ptr, nfs_offset, rlen))
return -9999;