summaryrefslogtreecommitdiff
path: root/lib/libusbhid/data.c
AgeCommit message (Collapse)Author
2020-04-04lib/libusbhid: Fix possible left shift changes signedness bit.fox
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@
2016-01-07Fix buffer-overrun/off-by-one in hid_set_data(3).jakllsch
(The tests only detected this as a problem on ARMv7, not i386.)
2016-01-01Fix hid_get_data() for negative or 32-bit report data.jakllsch
2010-05-12hid_get_data() will read an extra byte if the data being read ends onplunky
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.
2005-12-14Fix sign extension broken by previous. dillo hacked here too.wiz
2005-12-05fix non-portable right shifts.christos
2003-07-26netbsd.org->NetBSD.orgsalo
2003-03-08add RCSIDlukem
2001-12-28Update for uhidev(4) changes.augustss
Also rename libusb to libusbhid (which is a much better name).