[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZRhHkS8MfnwMlQot@google.com>
Date: Sat, 30 Sep 2023 09:06:41 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Justin Stitt <justinstitt@...gle.com>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] Input: synaptics-rmi4 - replace deprecated strncpy
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@...r.kernel.org
> Signed-off-by: Justin Stitt <justinstitt@...gle.com>
Applied, thank you.
--
Dmitry
Powered by blists - more mailing lists