Re: [PATCH v2] arm64/sysreg: refactor deprecated strncpy

From
Will Deacon <will@kernel.org>
Date
2023-08-16 18:26:31
Also in
linux-hardening, lkml
Reply to
Justin Stitt, 2023-08-11
On Fri, 11 Aug 2023 16:33:51 +0000, Justin Stitt wrote:
`strncpy` is deprecated for use on NUL-terminated destination strings
[1]. Which seems to be the case here due to the forceful setting of `buf`'s
tail to 0.

A suitable replacement is `strscpy` [2] due to the fact that it
guarantees NUL-termination on its destination buffer argument which is
_not_ the case for `strncpy`!

[...]
Applied to arm64 (for-next/misc), thanks!

[1/1] arm64/sysreg: refactor deprecated strncpy
      https://git.kernel.org/arm64/c/d232606773a0

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (5 messages) 5 messages, 3 authors, last reply 2023-09-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help