From: yuebingkun <yuebingkun@kylinos.cn>
To: David Laight <david.laight.linux@gmail.com>
Cc: Helge Deller <deller@gmx.de>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fbdev: platinumfb: replace strcpy with strscpy
Date: Tue, 18 Aug 2026 08:54:28 +0800 [thread overview]
Message-ID: <20260818005428.47917-1-yuebingkun@kylinos.cn> (raw)
In-Reply-To: <20260817153757.4a683d24@pumpkin>
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.
---
prev parent reply other threads:[~2026-08-18 0:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 3:18 [PATCH] fbdev: platinumfb: replace strcpy with strscpy yuebingkun
2026-08-17 14:37 ` David Laight
2026-08-18 0:48 ` yuebingkun
2026-08-18 0:54 ` yuebingkun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260818005428.47917-1-yuebingkun@kylinos.cn \
--to=yuebingkun@kylinos.cn \
--cc=david.laight.linux@gmail.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox