Date: Thu, 28 Apr 2016 02:39:43 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298732 - head/sys/fs/devfs Message-ID: <201604280239.u3S2dh9T039925@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Thu Apr 28 02:39:43 2016 New Revision: 298732 URL: https://svnweb.freebsd.org/changeset/base/298732 Log: sys/devfs: unsign an index to prevent signed integer overflow. cdp_maxdirent in struct:cdev_priv is of type u_int. Use the same type for the corresponding index in devfs_revoke(). MFC after: 1 week Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Thu Apr 28 01:58:56 2016 (r298731) +++ head/sys/fs/devfs/devfs_vnops.c Thu Apr 28 02:39:43 2016 (r298732) @@ -1444,7 +1444,7 @@ devfs_revoke(struct vop_revoke_args *ap) struct cdev *dev; struct cdev_priv *cdp; struct devfs_dirent *de; - int i; + u_int i; KASSERT((ap->a_flags & REVOKEALL) != 0, ("devfs_revoke !REVOKEALL"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604280239.u3S2dh9T039925>