Input: synaptics-rmi4 - replace deprecated strncpy
authorJustin Stitt <justinstitt@google.com>
Sat, 30 Sep 2023 16:05:07 +0000 (09:05 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 30 Sep 2023 16:24:15 +0000 (09:24 -0700)
commit96609688ab8a8ec25c4eeced53e88e26cff4fb06
tree59c99d6238d621c472b974abe7216cb958885bba
parentc50fdc48643a25f5218f6b8bba4f28e1b4a94708
Input: synaptics-rmi4 - replace deprecated strncpy

`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.

Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230921-strncpy-drivers-input-rmi4-rmi_f34-c-v1-1-4aef2e84b8d2@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_f34.c