diff options
| author | Azeem Shaikh <[email protected]> | 2023-07-03 18:12:56 +0000 |
|---|---|---|
| committer | Kalle Valo <[email protected]> | 2023-08-02 13:09:41 +0300 |
| commit | d6b484b5cb2a7d509b36a220911509ddd8b777c4 (patch) | |
| tree | edd1eb24d6af2f791dffd67c38793acaa765ee4f /tools/perf/scripts/python/stackcollapse.py | |
| parent | 111d5c4797c0f0314de8ef68b50259798ef3a127 (diff) | |
wifi: mt76: 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 DEV_ASSIGN is only used by
TRACE macros and the return values are ignored.
[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]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions