Re: [PATCH] RDMA/bnxt_re: Call strscpy() with correct size argument
From: Leon Romanovsky
Date: Tue Sep 09 2025 - 07:57:39 EST
On Mon, 01 Sep 2025 17:00:39 +0200, Thorsten Blum wrote:
> In bnxt_re_register_ib(), strscpy() is called with the length of the
> source string rather than the size of the destination buffer.
>
> This is fine as long as the destination buffer is larger than the source
> string, but we should still use the destination buffer size instead to
> call strscpy() as intended. And since 'node_desc' has a fixed size, we
> can safely omit the size argument and let strscpy() infer it using
> sizeof().
>
> [...]
Applied, thanks!
[1/1] RDMA/bnxt_re: Call strscpy() with correct size argument
https://git.kernel.org/rdma/rdma/c/9eda7148f0f78f
Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>