Re: [PATCH v3] soc: qcom: cmd-db: replace deprecated strncpy with strtomem

From: Bjorn Andersson
Date: Sun Apr 21 2024 - 18:30:28 EST



On Tue, 19 Mar 2024 21:19:59 +0000, Justin Stitt wrote:
> strncpy() is an ambiguous and potentially dangerous interface [1]. We
> should prefer more robust and less ambiguous alternatives.
>
> @query is marked as __nonstring and doesn't need to be NUL-terminated.
>
> Since we are doing a string to memory copy, we can use the aptly named
> "strtomem" -- specifically, the "pad" variant to also ensure NUL-padding
> throughout the destination buffer.
>
> [...]

Applied, thanks!

[1/1] soc: qcom: cmd-db: replace deprecated strncpy with strtomem
commit: 166db01007ea802ff9933ac73ec8f140ca0cf5d5

Best regards,
--
Bjorn Andersson <andersson@xxxxxxxxxx>