Re: [PATCH] fs: ecryptfs: replace deprecated strncpy with strscpy

2024-04-24 Thread Kees Cook
On Thu, 21 Mar 2024 00:38:54 +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. A good alternative is strscpy() as it guarantees > NUL-termination on the destinatio

Re: [PATCH] fs: ecryptfs: replace deprecated strncpy with strscpy

2024-03-28 Thread Kees Cook
On Thu, Mar 21, 2024 at 12:38:54AM +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. A good alternative is strscpy() as it guarantees > NUL-termination on the dest

[PATCH] fs: ecryptfs: replace deprecated strncpy with strscpy

2024-03-20 Thread Justin Stitt
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. A good alternative is strscpy() as it guarantees NUL-termination on the destination buffer. In crypto.c: We expect cipher_name to be NUL-terminat