Re: [PATCH] video/hdmi: prefer length specifier in format over string copying

2024-03-28 Thread Kees Cook
On Wed, Mar 20, 2024 at 11:22:02PM +, 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. > > It looks like the main use of strncpy() here is to limit the amount of >

[PATCH] video/hdmi: prefer length specifier in format over string copying

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. It looks like the main use of strncpy() here is to limit the amount of bytes printed from hdmi_log() by using a tmp buffer and limiting the numbe