From owner-svn-src-head@FreeBSD.ORG Thu Jun 3 13:43:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41982106566B; Thu, 3 Jun 2010 13:43:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 316CC8FC16; Thu, 3 Jun 2010 13:43:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o53Dhxx1094765; Thu, 3 Jun 2010 13:43:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o53Dhxem094763; Thu, 3 Jun 2010 13:43:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201006031343.o53Dhxem094763@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 3 Jun 2010 13:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208780 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2010 13:43:59 -0000 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++) { /*