diff options
author | Muthu M <muthu.lnx@gmail.com> | 2015-07-31 00:49:10 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-04 10:42:06 +0100 |
commit | 4d564919db48966ca8f3b3b528cbb1dfbf819ceb (patch) | |
tree | dca20a81966fb2bf3e1c3062a90a8524ee30b076 /usbmisc.c | |
parent | 13ada673bbf345e47a9923c04403ac4532e6a2a5 (diff) | |
download | usbutils-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |