Re: [PATCH] ASoC: wm_adsp_fw_find_test: Replace strlcat() with seq_buf

From: Richard Fitzgerald

Date: Mon Nov 09 2026 - 06:13:30 EST


On 07/11/2026 3:23 pm, 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 test builds the searched_fw_files string by appending to a fixed
size buffer in two places. Use seq_buf_init_append() and
seq_buf_puts() instead. seq_buf_init_append() keeps the NUL-terminated
content already in the buffer, and seq_buf_puts() copies as much as
fits and keeps the buffer NUL-terminated if it overflows.

Reviewed-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>