From owner-svn-src-head@FreeBSD.ORG Sun Sep 13 10:25:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3D761065672; Sun, 13 Sep 2009 10:25:33 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B27228FC0C; Sun, 13 Sep 2009 10:25:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8DAPXsK013696; Sun, 13 Sep 2009 10:25:33 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8DAPXBA013694; Sun, 13 Sep 2009 10:25:33 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909131025.n8DAPXBA013694@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 13 Sep 2009 10:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197151 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2009 10:25:33 -0000 Author: pjd Date: Sun Sep 13 10:25:33 2009 New Revision: 197151 URL: http://svn.freebsd.org/changeset/base/197151 Log: Be sure not to overflow struct fid. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Sep 13 10:12:29 2009 (r197150) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Sep 13 10:25:33 2009 (r197151) @@ -1149,6 +1149,8 @@ zfs_checkexp(vfs_t *vfsp, struct sockadd credanonp, numsecflavors, secflavors)); } +CTASSERT(SHORT_FID_LEN <= sizeof(struct fid)); +CTASSERT(LONG_FID_LEN <= sizeof(struct fid)); static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp)