summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/nfs.c4
-rw-r--r--net/nfs.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/net/nfs.c b/net/nfs.c
index 069f072..2363d61 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -542,7 +542,7 @@ nfs_read_reply (uchar *pkt, unsigned len)
printf ("%s\n", __FUNCTION__);
#endif
- memcpy ((uchar *)&rpc_pkt, pkt, len);
+ memcpy ((uchar *)&rpc_pkt, pkt, sizeof(rpc_pkt.u.reply));
if (rpc_pkt.u.reply.rstatus ||
rpc_pkt.u.reply.verifier ||
@@ -565,7 +565,7 @@ nfs_read_reply (uchar *pkt, unsigned len)
}
rlen = ntohl(rpc_pkt.u.reply.data[18]);
- store_block ((uchar *)&(rpc_pkt.u.reply.data[19]), nfs_offset, rlen);
+ store_block ((uchar *)pkt+sizeof(rpc_pkt.u.reply), nfs_offset, rlen);
return rlen;
}
diff --git a/net/nfs.h b/net/nfs.h
index ebd4266..712afa0 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -62,7 +62,7 @@ struct rpc_t {
uint32_t verifier;
uint32_t v2;
uint32_t astatus;
- uint32_t data[1];
+ uint32_t data[19];
} reply;
} u;
};