summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2010-05-17 23:55:38 +0000
committerrmacklem <rmacklem@FreeBSD.org>2010-05-17 23:55:38 +0000
commitacbea275194717865d4f0fb8bba3535198ee93b6 (patch)
treecdfdd5d7bc063efdd4741113bedcfe157859a58a
parent32689449b766670d03bb6c1a79bf4f9bdfa06610 (diff)
downloadFreeBSD-src-acbea275194717865d4f0fb8bba3535198ee93b6.zip
FreeBSD-src-acbea275194717865d4f0fb8bba3535198ee93b6.tar.gz
Add a sanity check for a negative args.fhsize to the experimental
NFS client. MFC after: 5 days
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 76154c3..b2cd92b 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -951,7 +951,7 @@ nfs_mount(struct mount *mp)
if (vfs_getopt(mp->mnt_optnew, "fh", (void **)&args.fh,
&args.fhsize) == 0) {
- if (args.fhsize > NFSX_FHMAX) {
+ if (args.fhsize < 0 || args.fhsize > NFSX_FHMAX) {
vfs_mount_error(mp, "Bad file handle");
error = EINVAL;
goto out;
OpenPOWER on IntegriCloud