svn commit: r208780 - head/sys/kern

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Jun 3 13:43:59 UTC 2010


Author: trasz
Date: Thu Jun  3 13:43:58 2010
New Revision: 208780
URL: http://svn.freebsd.org/changeset/base/208780

Log:
  The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
  
  Found with:	Coverity Prevent
  CID:		3684

Modified:
  head/sys/kern/subr_acl_posix1e.c

Modified: head/sys/kern/subr_acl_posix1e.c
==============================================================================
--- head/sys/kern/subr_acl_posix1e.c	Thu Jun  3 13:41:55 2010	(r208779)
+++ head/sys/kern/subr_acl_posix1e.c	Thu Jun  3 13:43:58 2010	(r208780)
@@ -558,7 +558,7 @@ acl_posix1e_check(struct acl *acl)
 	 */
 	num_acl_user_obj = num_acl_user = num_acl_group_obj = num_acl_group =
 	    num_acl_mask = num_acl_other = 0;
-	if (acl->acl_cnt > ACL_MAX_ENTRIES || acl->acl_cnt < 0)
+	if (acl->acl_cnt > ACL_MAX_ENTRIES)
 		return (EINVAL);
 	for (i = 0; i < acl->acl_cnt; i++) {
 		/*


More information about the svn-src-all mailing list