lsusb: Fix array entry count for variable sized entries.
PATCH 1/1 lsusb: Fix array entry count for variable sized entries.
Quoted 5 lines · Michael Drake
This fixes a divide by zero which happened when an array, without an explicit entry count (ultimately calculated from the value in the descriptor data's bLength field) was used on field with a variable size.
Quoted 8 lines
The solultion is to use the
get_entry_size()function on the array entry, which can get the entry size from a referenced field.Signed-off-by Michael Drake <[email protected]>--- desc-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Nice, that fixed the problem, thanks.
Now applied and pushed out.
greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html