Re: [PATCH] ALSA: pcmtest: Replace deprecated strcpy with strscpy_pad in setup_patt_bufs

From: Takashi Iwai

Date: Wed Nov 19 2025 - 11:18:11 EST


On Wed, 19 Nov 2025 14:52:17 +0100,
Thorsten Blum wrote:
>
> strcpy() has been deprecated [1] because it performs no bounds checking
> on the destination buffer, which can lead to buffer overflows. Replace
> it with the safer strscpy_pad(), and use kmalloc() instead of kzalloc()
> because strscpy_pad() zero-pads the destination buffer and therefore
> avoids writing to it twice.
>
> Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>

Applied to for-next branch now. Thanks.


Takashi