test: firmware_class: use kstrndup() where appropriate
authorBrian Norris <computersforpeace@gmail.com>
Wed, 9 Dec 2015 22:50:26 +0000 (14:50 -0800)
committerShuah Khan <shuahkh@osg.samsung.com>
Thu, 7 Jan 2016 20:43:28 +0000 (13:43 -0700)
commitbe4a1326d12cce8df1f57017bf4112eaab437a38
treec271e4c6942f46a387efabcdf3d003c9a80b5084
parent47e0bbb7fa985a0f1b5794a8653fae4f8f49de77
test: firmware_class: use kstrndup() where appropriate

We're essentially just doing an open-coded kstrndup(). The only
differences are with what happens after the first '\0' character, but
request_firmware() doesn't care about that.

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
lib/test_firmware.c