diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-08-09 15:06:19 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-08-09 15:06:19 -0400 |
commit | dd8ac1da4190139de70da18823ff8f5992a649ae (patch) | |
tree | 7ea277a5ef6a17aa43aafc89697dd8ca961f35b2 /fs/nfs | |
parent | 7b2aa037e878c939676675969983284a02958ae3 (diff) |
nfs: Keep index within mnt_errtbl[]
Ensure that index i remains within array mnt_errtbl[] and mnt3_errtbl[].
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/mount_clnt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 38ef9eaec407..8b9affc8bab2 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -258,7 +258,7 @@ static int decode_status(struct xdr_stream *xdr, struct mountres *res) | |||
258 | return -EIO; | 258 | return -EIO; |
259 | status = ntohl(*p); | 259 | status = ntohl(*p); |
260 | 260 | ||
261 | for (i = 0; i <= ARRAY_SIZE(mnt_errtbl); i++) { | 261 | for (i = 0; i < ARRAY_SIZE(mnt_errtbl); i++) { |
262 | if (mnt_errtbl[i].status == status) { | 262 | if (mnt_errtbl[i].status == status) { |
263 | res->errno = mnt_errtbl[i].errno; | 263 | res->errno = mnt_errtbl[i].errno; |
264 | return 0; | 264 | return 0; |
@@ -309,7 +309,7 @@ static int decode_fhs_status(struct xdr_stream *xdr, struct mountres *res) | |||
309 | return -EIO; | 309 | return -EIO; |
310 | status = ntohl(*p); | 310 | status = ntohl(*p); |
311 | 311 | ||
312 | for (i = 0; i <= ARRAY_SIZE(mnt3_errtbl); i++) { | 312 | for (i = 0; i < ARRAY_SIZE(mnt3_errtbl); i++) { |
313 | if (mnt3_errtbl[i].status == status) { | 313 | if (mnt3_errtbl[i].status == status) { |
314 | res->errno = mnt3_errtbl[i].errno; | 314 | res->errno = mnt3_errtbl[i].errno; |
315 | return 0; | 315 | return 0; |