diff options
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 49c7cd0502cc..779d2eb649c5 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -130,10 +130,11 @@ static int xdr_decode_fhstatus3(struct rpc_rqst *req, __be32 *p, | |||
130 | struct mnt_fhstatus *res) | 130 | struct mnt_fhstatus *res) |
131 | { | 131 | { |
132 | struct nfs_fh *fh = res->fh; | 132 | struct nfs_fh *fh = res->fh; |
133 | unsigned size; | ||
133 | 134 | ||
134 | if ((res->status = ntohl(*p++)) == 0) { | 135 | if ((res->status = ntohl(*p++)) == 0) { |
135 | int size = ntohl(*p++); | 136 | size = ntohl(*p++); |
136 | if (size <= NFS3_FHSIZE) { | 137 | if (size <= NFS3_FHSIZE && size != 0) { |
137 | fh->size = size; | 138 | fh->size = size; |
138 | memcpy(fh->data, p, size); | 139 | memcpy(fh->data, p, size); |
139 | } else | 140 | } else |