From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Andrey Zakharov <dedemorow@gmail.com>, broonie@kernel.org
Cc: patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
ckeepax@opensource.cirrus.com, simont@opensource.cirrus.com
Subject: Re: [PATCH] firmware: cs_dsp: Replace strlcat() with seq_buf in KUnit tests
Date: Tue, 24 Nov 2026 13:59:42 +0000 [thread overview]
Message-ID: <642fac8d-4589-42da-9a46-221bd4fdebd9@opensource.cirrus.com> (raw)
In-Reply-To: <20261124113655.610791-1-dedemorow@gmail.com>
On 24/11/2026 11:36 am, Andrey Zakharov wrote:
> strlcat() is being removed from the kernel. It runs an unbounded
> strlen() on the destination, and its size argument is not tied to
> the real buffer, see the issue below.
>
> The bin and wmfw tests fill a 512 byte buffer with a repeated string
> by calling strlcat() in a loop, and use the return value to detect
> that the buffer is full. Use seq_buf_init() and seq_buf_puts() and
> stop when seq_buf_has_overflowed() is true. kunit_kzalloc() returns
> a zeroed buffer, so seq_buf_init() is enough here.
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
prev parent reply other threads:[~2026-11-24 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 11:36 Andrey Zakharov
2026-11-24 13:59 ` Richard Fitzgerald [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=642fac8d-4589-42da-9a46-221bd4fdebd9@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=dedemorow@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=simont@opensource.cirrus.com \
/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
all inboxes | Powered by JetHome®