Re: [PATCH linux-next] net: hns3: use strscpy() to instead of strncpy()

From: Simon Horman
Date: Thu Dec 08 2022 - 11:11:29 EST


On Thu, Dec 08, 2022 at 07:53:25PM +0800, yang.yang29@xxxxxxxxxx wrote:
> From: Xu Panda <xu.panda@xxxxxxxxxx>
>
> The implementation of strscpy() is more robust and safer.
> That's now the recommended way to copy NUL terminated strings.
>
> Signed-off-by: Xu Panda <xu.panda@xxxxxxxxxx>
> Signed-off-by: Yang Yang <yang.yang29@xxxxxxx>

This change looks good to me, although it should probably be
tagged for 'net-next' rather than 'linux-next'.

[PATCH net-next] net: hns3: use strscpy() to instead of strncpy

That notwithstanding,

Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>