lkml.org 
[lkml]   [2023]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] power: supply: charger-manager: replace deprecated strncpy with strscpy
Date

On Fri, 20 Oct 2023 19:21:46 +0000, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We expect cm->psy_name_buf to be NUL-terminated based on its usage with
> format strings:
> 1522: cm->charger_psy_desc.name = cm->psy_name_buf;
> ...
> 1587: dev_err(&pdev->dev, "Cannot register charger-manager with name \"%s\"\n",
> 1587: cm->charger_psy_desc.name);
>
> [...]

Applied, thanks!

[1/1] power: supply: charger-manager: replace deprecated strncpy with strscpy
commit: e1402bd297a3477c16eca4c1e4094372237f40a7

Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>

\
 
 \ /
  Last update: 2023-10-21 02:54    [W:0.156 / U:26.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site