Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/kern
>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
Home |
Main Index |
Thread Index |
Old Index