| Age | Commit message (Collapse) | Author |
|
This bug was reported by UBSan runs.
lib/libusbhid/data.c:58:25
lib/libusbhid/data.c:91:7
lib/libusbhid/data.c:92:7
Can result in left shift changes signedness bit as a side effect positive number
can go negative, cast it to unsigned for the operation and silence the issue.
Reviewed by: kamil@
|
|
(The tests only detected this as a problem on ARMv7, not i386.)
|
|
|
|
a byte boundary. This byte is subsequently discarded, but it could be
a byte from memory after the end of the report being parsed.
Fix this by rounding up and ending the loop one earlier.
|
|
|
|
|
|
|
|
|
|
Also rename libusb to libusbhid (which is a much better name).
|