Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2010 23:55:38 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208234 - head/sys/fs/nfsclient
Message-ID:  <201005172355.o4HNtc90077440@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon May 17 23:55:38 2010
New Revision: 208234
URL: http://svn.freebsd.org/changeset/base/208234

Log:
  Add a sanity check for a negative args.fhsize to the experimental
  NFS client.
  
  MFC after:	5 days

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Mon May 17 23:55:23 2010	(r208233)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Mon May 17 23:55:38 2010	(r208234)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005172355.o4HNtc90077440>