Thread (6 messages) 6 messages, 5 authors, 2025-09-02

Re: [PATCH v2] net/smc: Replace use of strncpy on NUL-terminated string with strscpy

From: Simon Horman <horms@kernel.org>
Date: 2025-09-01 16:03:59
Also in: linux-kernel-mentees, linux-rdma, linux-s390, lkml

On Sun, Aug 31, 2025 at 08:04:59PM -0700, James Flowers wrote:
strncpy is deprecated for use on NUL-terminated strings, as indicated in
Documentation/process/deprecated.rst. strncpy NUL-pads the destination
buffer and doesn't guarantee the destination buffer will be NUL
terminated.

Signed-off-by: James Flowers <redacted>
---
V1 -> V2: Replaced with two argument version of strscpy
Note: this has only been compile tested.
Reviewed-by: Simon Horman <horms@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help