Subject: Re: CVS commit: src/sys/kern
To: matthew green <mrg@eterna.com.au>
From: None <itojun@iijlab.net>
List: source-changes
Date: 05/17/2003 02:05:57
>this change, among many others, is converting *safe* strc*()
>calls into strl* ones.  is there any particular reason you are
>doing this?

	many of seemingly-safe strcpy are safe because:
	- foo.h defines destination buffer bigger than/same size as source
	  (intentionally or by coincidence?  they are hardcoded numbers, not
	  macros, in many cases!)
	- MALLOC(len + 1) is performed right before strcpy

	by using strlcpy, we can avoid any overrun mistakes even when foo.h
	changes, MALLOC() changed by someone, or whatever assumption changes.

>you are making the kernel slower for *no good
>reason*.
	  
	i am doing it with reason.  care to provide asm version of strlcpy? :-)

itojun