diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2010-05-17 23:55:38 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2010-05-17 23:55:38 +0000 |
commit | acbea275194717865d4f0fb8bba3535198ee93b6 (patch) | |
tree | cdfdd5d7bc063efdd4741113bedcfe157859a58a | |
parent | 32689449b766670d03bb6c1a79bf4f9bdfa06610 (diff) | |
download | FreeBSD-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.c | 2 |
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; |