Re: Usage of strncpy in the kernel

Mouse <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
> All strlcpy() does extra is guarantee NUL-termination,

Extra?  Over strcpy and strncpy?

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.)

/~\ 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.