Re: [PATCH] video: fbdev: fsl-diu-fb: replace deprecated strncpy with strscpy_pad

2024-03-28 Thread Kees Cook
On Wed, Mar 20, 2024 at 10:48:50PM +, 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 better alternative is strscpy() as it guarantees NUL-termination on > t

[PATCH] video: fbdev: fsl-diu-fb: replace deprecated strncpy with strscpy_pad

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 better alternative is strscpy() as it guarantees NUL-termination on the destination buffer. Since we are eventually copying over to userspace,