Re: [PATCH] fbdev: platinumfb: replace strcpy with strscpy

yuebingkun <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-fbdev
Message-ID <[email protected]>
On Mon, 17 Aug 2026, David Laight wrote:
> There is no point using strscpy() to copy quoted strings into arrays.
> Indeed, if the string is too long the kernel build will fail if strcpy()
> is used but strscpy() will silently truncate the strings.
> So strscpy() is actually worse here.

Thank you for the explanation. You are right, for copying a known
string literal into a fixed-size array, strcpy() is actually safer
because the compiler can catch overflow at build time. I will drop
this patch.

---
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.