Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2010 01:01:59 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r208408 - stable/8/sys/fs/nfsclient
Message-ID:  <201005220101.o4M11xKW095912@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sat May 22 01:01:59 2010
New Revision: 208408
URL: http://svn.freebsd.org/changeset/base/208408

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

Modified:
  stable/8/sys/fs/nfsclient/nfs_clvfsops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvfsops.c	Sat May 22 00:43:14 2010	(r208407)
+++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c	Sat May 22 01:01:59 2010	(r208408)
@@ -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?201005220101.o4M11xKW095912>