summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorAzeem Shaikh <azeemshaikh38@gmail.com>2023-05-30 16:23:58 +0000
committerDinh Nguyen <dinguyen@kernel.org>2023-06-13 16:51:49 -0500
commit6a22e017f952ecaf4bb510cd0939259470a27b06 (patch)
tree3cbfcd647a46bae5838e0213783e4a844d6f77c5 /block
parent6ebe94baa2b9ddf3ccbb7f94df6ab26234532734 (diff)
nios2: 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 Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions