PERFORCE change 15640 for review
Chris Costello
chris at freebsd.org
Wed Aug 7 15:28:56 GMT 2002
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 <chris at FreeBSD.org>
FreeBSD Project http://www.FreeBSD.org/
TrustedBSD Project http://www.TrustedBSD.org/
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list