summaryrefslogtreecommitdiff
path: root/drivers/firewire
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2023-11-16 11:13:40 -0800
committerHelge Deller <deller@gmx.de>2023-11-18 18:59:28 +0100
commit721d28f3dfb3e40c45ce45fbeeff47b72c230bc9 (patch)
tree42e9d8588f81177e2e212ac12fe8a30ea4fcce46 /drivers/firewire
parentb85ea95d086471afb4ad062012a4d73cd328fa86 (diff)
parisc: 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]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge Deller <deller@gmx.de> Cc: Azeem Shaikh <azeemshaikh38@gmail.com> Cc: linux-parisc@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/firewire')
0 files changed, 0 insertions, 0 deletions