summaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorKent Gibson <warthog618@gmail.com>2020-10-05 15:02:46 +0800
committerLinus Walleij <linus.walleij@linaro.org>2020-10-08 22:57:16 +0200
commitf188ac1251b909c2d804a6fee54e4e360754c92f (patch)
treeeacd83d158b0926a4bbfb47713af0dd7ec4e8be5 /drivers/rpmsg
parent8c270fbceba4e13c992ac138e51db217c4844ed6 (diff)
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/rpmsg')
0 files changed, 0 insertions, 0 deletions