Author: pfg
Date: Thu May  5 01:34:58 2016
New Revision: 299106
URL: https://svnweb.freebsd.org/changeset/base/299106

Log:
  MFC r298732:
  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().

Modified:
  stable/10/sys/fs/devfs/devfs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- stable/10/sys/fs/devfs/devfs_vnops.c        Thu May  5 01:30:53 2016        
(r299105)
+++ stable/10/sys/fs/devfs/devfs_vnops.c        Thu May  5 01:34:58 2016        
(r299106)
@@ -1409,7 +1409,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"));
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to