diff options
author | Azeem Shaikh <[email protected]> | 2023-06-13 00:33:25 +0000 |
---|---|---|
committer | Stefan Schmidt <[email protected]> | 2023-06-16 22:14:24 +0200 |
commit | cd9125030689dda69f73f6c2843d63135cb383f0 (patch) | |
tree | 4fffff073ceadecf1f0590d4a988999b769104f8 /scripts/generate_rust_analyzer.py | |
parent | bd4e3d82f4ccb422672029b099e402e5b3acd5ee (diff) |
ieee802154: 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().
Direct replacement is safe here since the return values
from the helper macros are ignored by the callers.
[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 <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stefan Schmidt <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions