Commit: 06a71a5cfd35c74c7905c438f31ad7e6964f9ee5
Parent: 13eee21e643784d19bdede55089645f83483bbf4
Author: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2014-04-30 15:51:04
Tree: 8fe8c47677e9c34a24b618efd21e71a78a3228b2

hog: Fix checking for Report ID item presence Report ID item in Report Descriptor is now detected by simply looking for applicable item prefixes anywhere in data and does not take items structure into consideration. This could lead to false-positive detections in case value we look for is just part of item data, not an actual item prefix. As defined in Device Class Definition for HID (6.2.2.7), Report ID is a short item with prefix 100001nn (binary) thus we do not need to do complete parsing of Report Descriptor but only need to check items prefixes in order to find Report ID items reliably. This patch checks Report Descriptor item by item looking for item prefix which matches Report ID, as defined in spec above.

Diffstat

M profiles/input/hog.c | 67 ++++++++++++++++++++++++++++++++++++++++- - - - -

1 files changed, 62 insertions(+), 5 deletions(-)

View Full Diff | Patch