diff options
author | Kent Gibson <warthog618@gmail.com> | 2020-10-05 10:02:46 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-10-08 23:57:16 +0300 |
commit | f188ac1251b909c2d804a6fee54e4e360754c92f (patch) | |
tree | eacd83d158b0926a4bbfb47713af0dd7ec4e8be5 /drivers/scsi/hpsa.c | |
parent | 8c270fbceba4e13c992ac138e51db217c4844ed6 (diff) | |
download | linux-f188ac1251b909c2d804a6fee54e4e360754c92f.tar.xz |
gpiolib: cdev: switch from kstrdup() to kstrndup()
Use kstrndup() to copy line labels from the userspace provided char
array, rather than ensuring the char array contains a null terminator
and using kstrdup().
Note that the length provided to kstrndup() still assumes that the char
array does contain a null terminator, so the maximum string length is one
less than the array. This is consistent with the previous behaviour.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20201005070246.20927-1-warthog618@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/scsi/hpsa.c')
0 files changed, 0 insertions, 0 deletions