gpiolib: cdev: replace strncpy() with strscpy()
Replace usage of strncpy() with strscpy() to remove -Wstringop-truncation warnings. The structures 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 <lkp@intel.com> Signed-off-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Showing
Please register or sign in to comment