Date: Thu, 3 Jun 2010 13:43:59 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208780 - head/sys/kern Message-ID: <201006031343.o53Dhxem094763@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006031343.o53Dhxem094763>