From owner-p4-projects Wed Aug 7 8:27:54 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 66B1C37B401; Wed, 7 Aug 2002 08:27:50 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBE1837B400; Wed, 7 Aug 2002 08:27:49 -0700 (PDT) Received: from holly.calldei.com (adsl-208-191-149-232.dsl.hstntx.swbell.net [208.191.149.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7503743E75; Wed, 7 Aug 2002 08:27:49 -0700 (PDT) (envelope-from chris@holly.dyndns.org) Received: by holly.calldei.com (Postfix, from userid 1001) id 65964B78; Wed, 7 Aug 2002 10:28:56 -0500 (CDT) Date: Wed, 7 Aug 2002 10:28:56 -0500 From: Chris Costello To: Robert Watson Cc: Perforce Change Reviews Subject: Re: PERFORCE change 15640 for review Message-ID: <20020807152856.GB1620@holly.calldei.com> Reply-To: chris@FreeBSD.org References: <200208071501.g77F1kqX000349@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208071501.g77F1kqX000349@freefall.freebsd.org> User-Agent: Mutt/1.4i Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday, August 07, 2002, Robert Watson wrote: > Fix (I believe) support for the trusted_interfaces variable by > bzero'ing a buffer in the stack to truncate strings by default. > > Differences ... > > ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#94 (text+ko) ==== > > @@ -980,6 +980,7 @@ > !strvalid(trusted_interfaces, sizeof(trusted_interfaces))) > goto set; > > + bzero(tiflist, sizeof(tiflist)); > for (p = trusted_interfaces, q = tiflist; *p != '\0'; p++, q++) > if(*p != ' ' && *p != '\t') > *q = *p; I wonder if just placing *++p = '\0'; wouldn't be better and/or faster, instead of zeroing the whole thing beforehand... -- Chris Costello FreeBSD Project http://www.FreeBSD.org/ TrustedBSD Project http://www.TrustedBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message