diff options
author | Azeem Shaikh <azeemshaikh38@gmail.com> | 2023-07-03 19:58:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-07-04 20:40:16 +0200 |
commit | ba7bdec3cbec7b0135f7ec0458073cbe9ae74de5 (patch) | |
tree | bbb0dc5af2371242ac839a5078b51920ec34bbb2 /net | |
parent | pptp: Fix fib lookup calls. (diff) | |
download | linux-ba7bdec3cbec7b0135f7ec0458073cbe9ae74de5.tar.xz linux-ba7bdec3cbec7b0135f7ec0458073cbe9ae74de5.zip |
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 'net')
0 files changed, 0 insertions, 0 deletions