From: David Laight <david.laight.linux@gmail.com>
To: Ian Bridges <icb@fastmail.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] Input: wacom_w8001 - replace strlcat() with a strscpy() helper
Date: Thu, 16 Jul 2026 10:32:36 +0100 [thread overview]
Message-ID: <20260716103236.28c1b5bb@pumpkin> (raw)
In-Reply-To: <albg4Rv7QxvLJD05@dev>
On Tue, 14 Jul 2026 20:22:41 -0500
Ian Bridges <icb@fastmail.org> wrote:
> In preparation for removing the strlcat() API[1], replace its five
> uses with a small append helper built on strnlen() and strscpy().
>
> The five calls append device name fragments to a basename buffer
> that grows in place across the setup functions. The helper takes
> the same arguments as strlcat() and writes the same bytes, including
> when a fragment is truncated.
You can do much better than that...
Change w8001_setup_touch/pen() to return the 'const char *' name,
then put everything together in the final snprintf().
David
prev parent reply other threads:[~2026-07-16 9:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 1:22 [PATCH] Input: wacom_w8001 - replace strlcat() with a strscpy() helper Ian Bridges
2026-07-15 1:32 ` sashiko-bot
2026-07-16 1:39 ` Dmitry Torokhov
2026-07-16 9:32 ` David Laight [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=20260716103236.28c1b5bb@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=icb@fastmail.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-input@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.