Re: [PATCH v8 02/20] gpiolib: cdev: replace strncpy with strscpy

2020-09-15 Thread Andy Shevchenko
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

[PATCH v8 02/20] gpiolib: cdev: replace strncpy with strscpy

2020-09-09 Thread Kent Gibson
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: