linux/drivers/scsi/bnx2i
Azeem Shaikh 8d82557e4b scsi: bnx2i: Replace all non-returning 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>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230517143130.1519941-1-azeemshaikh38@gmail.com
2023-05-26 13:52:19 -07:00
..
57xx_iscsi_constants.h
57xx_iscsi_hsi.h
bnx2i_hwi.c scsi: iscsi: Merge suspend fields 2022-04-11 22:09:35 -04:00
bnx2i_init.c scsi: bnx2i: Replace all non-returning strlcpy with strscpy 2023-05-26 13:52:19 -07:00
bnx2i_iscsi.c scsi: iscsi: Declare SCSI host template const 2023-03-24 19:19:57 -04:00
bnx2i_sysfs.c scsi: bnx2i: Switch to attribute groups 2021-10-16 21:45:55 -04:00
bnx2i.h scsi: bnx2i: Switch to attribute groups 2021-10-16 21:45:55 -04:00
Kconfig
Makefile