summaryrefslogtreecommitdiff
path: root/drivers/eisa/eisa-bus.c
diff options
context:
space:
mode:
authorAzeem Shaikh <azeemshaikh38@gmail.com>2023-07-03 16:58:16 +0000
committerKees Cook <keescook@chromium.org>2023-07-27 08:51:25 -0700
commitc9732f1461f947429f8ee9289792c5ffea793350 (patch)
tree298c5375e0e7704a66104dc4fdaa90d06544d816 /drivers/eisa/eisa-bus.c
parent61ce78f29a694772c3b2c5c749589682dbdfec2d (diff)
perf: Replace strlcpy with strscpy
strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated [1]. In an effort to remove strlcpy() completely [2], replace strlcpy() here with strscpy(). No return values were used, so direct replacement is safe. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20230703165817.2840457-1-azeemshaikh38@gmail.com Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/eisa/eisa-bus.c')
0 files changed, 0 insertions, 0 deletions