diff options
author | Azeem Shaikh <[email protected]> | 2023-06-01 09:34:26 +0100 |
---|---|---|
committer | Russell King (Oracle) <[email protected]> | 2023-06-19 09:35:49 +0100 |
commit | 7611b3358acbe9b95990ad63d66dd11efcac4594 (patch) | |
tree | 71ee46e3ace6cdb6a79b005ccf7205a78fb04ed3 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
parent | ddbb7ea96a609335837d0579b7e0cc5e6dbaabce (diff) |
ARM: 9300/1: 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
[ardb: submitting to the patch tracker on behalf of Azeem]
Signed-off-by: Azeem Shaikh <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Russell King (Oracle) <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions