clinuxlinux-kernelstrcpystrlcpy

What defines strscpy in C?


From this video on youtube by Kees Cook from linux.conf.au 2019 he mentions strscpy as being preferred but generally doing what users want (less NUL-padding). However, he doesn't say what defines this (spec or header),

Slide from the video,

strscpy slide

I can't find strscpy() with man

$ for i in strcpy strlcpy strscpy; do man -w $i; done;
/usr/share/man/man3/strcpy.3.gz
/usr/share/man/man3/strlcpy.3bsd.gz
No manual entry for strscpy

Solution

  • It's in the linux source, not in the standard library. Online man page