svn commit: r298732 - head/sys/fs/devfs
Pedro F. Giffuni
pfg at FreeBSD.org
Thu Apr 28 02:39:44 UTC 2016
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"));
More information about the svn-src-head
mailing list