Thread (3 messages) 3 messages, 3 authors, 2023-09-30

Re: [PATCH] Input: synaptics-rmi4 - replace deprecated strncpy

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2023-09-30 16:06:50
Also in: linux-hardening, lkml

On Thu, Sep 21, 2023 at 09:58:11AM +0000, Justin Stitt wrote:
`strncpy` is deprecated for use on NUL-terminated destination strings [1]

Let's use memcpy() as the bounds have already been checked and this
decays into a simple byte copy from one buffer to another removing any
ambiguity that strncpy has.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt <justinstitt@google.com>
Applied, thank you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help