Re: [PATCH v4] media: siano: Replace strlcat() with scnprintf() in sms_ir_init()

From: Kees Cook

Date: Thu Nov 12 2026 - 14:58:55 EST


On Fri, Nov 06, 2026 at 07:39:28PM -0800, Mariia Nikitash wrote:
> In preparation for removing the deprecated strlcat() API[1], replace
> the strscpy() and strlcat() calls with a single bounded scnprintf()
> call to construct the IR device path.
>
> This preserves the original NUL-terminated output, including partial
> or omitted "/ir0" suffixes when the 32-byte buffer is too small.
>
> Link: https://github.com/KSPP/linux/issues/370 [1]
> Signed-off-by: Mariia Nikitash <nikitash.mariiaw@xxxxxxxxx>

Thanks for the revisions! :)

Reviewed-by: Kees Cook <kees@xxxxxxxxxx>

--
Kees Cook