[Ksummit-discuss] [MAINTAINERS SUMMIT] API replacement/deprecation

Theodore Y. Ts'o tytso at mit.edu
Fri Sep 7 14:33:26 UTC 2018


On Thu, Sep 06, 2018 at 04:24:03PM -0700, Kees Cook wrote:
> 
> Hopefully we can all agree on deprecating strcpy() and strncpy() in
> favor of strscpy()?

There are some places where I use strncpy for a character array which
is *not* a null-terminated string.  What is the preferred alternative
for me?  I can suppress the problem when gcc complains about it using:

+       __u8    s_first_error_func[32] __nonstring;     /* function where the error happened */

But if we do a blanket deprecation, what should I use instead?

      	       	       		    	 - Ted


More information about the Ksummit-discuss mailing list