summaryrefslogtreecommitdiff
path: root/usbmisc.c
diff options
context:
space:
mode:
authorMuthu M <muthu.lnx@gmail.com>2015-07-31 00:49:10 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 10:42:06 +0100
commit4d564919db48966ca8f3b3b528cbb1dfbf819ceb (patch)
treedca20a81966fb2bf3e1c3062a90a8524ee30b076 /usbmisc.c
parent13ada673bbf345e47a9923c04403ac4532e6a2a5 (diff)
downloadusbutils-4d564919db48966ca8f3b3b528cbb1dfbf819ceb.tar.gz
lsusb: Fix issue with lengthy string descriptors
Fixed the issue in displaying lengthy string descriptor (more than 128 bytes) Signed-off-by: Muthu M <muthu.lnx@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'usbmisc.c')
-rw-r--r--usbmisc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usbmisc.c b/usbmisc.c
index f3577ea..71a702c 100644
--- a/usbmisc.c
+++ b/usbmisc.c
@@ -229,7 +229,7 @@ char *get_dev_string(libusb_device_handle *dev, u_int8_t id)
sizeof unicode_buf);
if (ret < 2) return strdup("(error)");
- if (unicode_buf[0] < 2 || unicode_buf[1] != LIBUSB_DT_STRING)
+ if ((unsigned char)unicode_buf[0] < 2 || unicode_buf[1] != LIBUSB_DT_STRING)
return strdup("(error)");
buf = usb_string_to_native(unicode_buf + 2,