summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorAzeem Shaikh <azeemshaikh38@gmail.com>2023-07-03 20:58:40 +0300
committerDavid S. Miller <davem@davemloft.net>2023-07-04 21:40:16 +0300
commitba7bdec3cbec7b0135f7ec0458073cbe9ae74de5 (patch)
treebbb0dc5af2371242ac839a5078b51920ec34bbb2 /scripts/lib
parent84bef5b6037c15180ef88ac4216dc621d16df1a6 (diff)
downloadlinux-ba7bdec3cbec7b0135f7ec0458073cbe9ae74de5.tar.xz
net: 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: Simon Horman <simon.horman@corigine.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions