Re: Usage of strncpy in the kernel

Mouse <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
>> No, that's not all.  It also fills the rest, if any, of the
>> destination space with more NULs.  (This can be useful to, for
>> example, prevent leaking kernel stack trash to userland.)
> Unfortunately modern compilers no longer guarantee this is true.

Any compiler that renders strncpy() (not strlcpy - that was my mistake)
incapable of upholding its interface contract is, IMO, not suitable for
general-purpose use such as building - or working under - NetBSD.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.