summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2003-01-05 03:42:16 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-01-05 03:42:16 -0800
commitf64652e149ae24c9554a99f1aa838eb84c10c756 (patch)
treeea26f5c3f6a42d43dd9399db86219815f36257eb
parentb10bf2956ff25a39fdfc15b0f6c87c3f78c54d3a (diff)
[PATCH] knfsd: Avoid opps when NFSD decodes bad filehandle
If an NFSv3 request claims an enourmous filehandle, we can believe it and oops. The test should be unsigned...
-rw-r--r--fs/nfsd/nfs3xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 3cb91cc3cb03..7a6ef7e5a31a 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -58,7 +58,7 @@ decode_time3(u32 *p, struct timespec *time)
static inline u32 *
decode_fh(u32 *p, struct svc_fh *fhp)
{
- int size;
+ unsigned int size;
fh_init(fhp, NFS3_FHSIZE);
size = ntohl(*p++);
if (size > NFS3_FHSIZE)