summaryrefslogtreecommitdiff
path: root/drivers/accel/ivpu/ivpu_drv.c
diff options
context:
space:
mode:
authorJustin Stitt <justinstitt@google.com>2023-09-19 07:41:16 +0300
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2023-09-27 13:38:54 +0300
commit9edb071c8bd322482fa9cd1b60f26d0243479d76 (patch)
treee9d2282c66834a3bcc5502ca434ff32222880483 /drivers/accel/ivpu/ivpu_drv.c
parent78f54469b871db5ba8ea49abd4e5994e97bd525b (diff)
downloadlinux-9edb071c8bd322482fa9cd1b60f26d0243479d76.tar.xz
drm/gma500: refactor deprecated strncpy
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. Since `chan->base.name` is expected to be NUL-terminated, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without also unnecessarily NUL-padding (since `chan` is kzalloc'd already). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt <justinstitt@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230919-drivers-gpu-drm-gma500-oaktrail_lvds_i2c-c-v2-1-9ebe6983b4cb@google.com
Diffstat (limited to 'drivers/accel/ivpu/ivpu_drv.c')
0 files changed, 0 insertions, 0 deletions