usbip: fix usbip bind writing random string after command in match_busid
authorJuan Zea <juan.zea@qindel.com>
Fri, 15 Dec 2017 09:21:20 +0000 (10:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2018 19:31:13 +0000 (20:31 +0100)
commit2ee11dcfc9e1c894b058de64fb8b693cf697fbbe
treedc0f68f0ac329a0a324addc9741e8d09a9d125b8
parent38e8981d5490b2908136baea1f9e3b84a87aec01
usbip: fix usbip bind writing random string after command in match_busid

commit 544c4605acc5ae4afe7dd5914147947db182f2fb upstream.

usbip bind writes commands followed by random string when writing to
match_busid attribute in sysfs, caused by using full variable size
instead of string length.

Signed-off-by: Juan Zea <juan.zea@qindel.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/usb/usbip/src/utils.c