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 deletions(-)
diff --git a
> 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
+++ b/tools/usb/usbip/s
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(-)
diff --git a/tools/usb
3 matches
Mail list logo