Re: [PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-15 Thread Shuah Khan
On 12/15/2017 02:21 AM, Juan Zea wrote: > 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 > --- > tools/usb/usbip/src/utils.c |

[PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-15 Thread Juan Zea
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 --- tools/usb/usbip/src/utils.c | 9 ++--- 1 file changed, 6 insertions(+), 3

Re: [PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-14 Thread Shuah Khan
On 12/14/2017 03:23 AM, Juan Zea wrote: >> Why not use the return value from snprintf() for length, instead of calling > strlen(command)? > > Yes, that makes sense. Something like this? Yes > > diff --git a/tools/usb/usbip/src/utils.c b/tools/usb/usbip/src/utils.c > index 2b3d6d2..3d7b42e

Re: [PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-14 Thread Juan Zea
> Why not use the return value from snprintf() for length, instead of calling strlen(command)? Yes, that makes sense. Something like this? diff --git a/tools/usb/usbip/src/utils.c b/tools/usb/usbip/src/utils.c index 2b3d6d2..3d7b42e 100644 --- a/tools/usb/usbip/src/utils.c +++

Re: [PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Shuah Khan
On 12/13/2017 04:07 AM, Juan Zea wrote: > 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 > --- > tools/usb/usbip/src/utils.c |

[PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Juan Zea
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 --- tools/usb/usbip/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Greg KH
On Wed, Dec 13, 2017 at 11:16:03AM +0100, Juan Zea wrote: > 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 > --- >

[PATCH] usbip: fix usbip bind writing random string after command in match_busid

2017-12-13 Thread Juan Zea
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 --- tools/usb/usbip/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)