On Wed, Sep 9, 2020 at 1:34 PM Kent Gibson wrote:
>
> Replace usage of strncpy with strscpy to remove -Wstringop-truncation
strnspy() with strscpy()
> warnings.
>
> The structs being populated are zeroed, to prevent stack leakage as
structures
> they are returned to userspace, so strscpy
Replace usage of strncpy with strscpy to remove -Wstringop-truncation
warnings.
The structs being populated are zeroed, to prevent stack leakage as
they are returned to userspace, so strscpy performs the equivalent
function without the warnings.
Reported-by: kernel test robot
Signed-off-by:
2 matches
Mail list logo