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

From: Shihuang Liu

Date: Sat Nov 07 2026 - 05:30:24 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>

Tested-by: Shihuang Liu <shlomojune6@xxxxxxxxx>