Solaar/lib
Ken Sanislo f469e86b9c Guard Centurion feature lookups against HID++ 2.0 enum collisions
IntEnum members with the same int value hash equal and compare equal,
so a dict lookup for SupportedFeature.DEVICE_NAME (0x0005) finds an
entry stored as CenturionCoreFeature.MULTI_HOST_CONTROL (same 0x0005).
The index is right for the Centurion feature but wrong for the HID++
2.0 feature the caller intended.

Concrete impact: `solaar show` on wired G522 called get_kind()
-> feature_request(DEVICE_NAME, 0x20), which resolved to
MULTI_HOST_CONTROL.function_2 via the collision, and the device
returned OUT_OF_RANGE -> FeatureCallError crashed `solaar show`.

Fix: in Device.feature_request, after resolving the index, compare the
type of the stored inverse entry against the type of the requested
feature. Mismatched types mean the device actually has the Centurion
variant, not the HID++ 2.0 feature — return None instead of issuing a
mis-targeted request.
2026-05-10 15:39:17 -07:00
..
hid_parser Fix duplicate class field typo in HID parser data 2026-05-05 14:43:03 -04:00
hidapi Add G522 LIGHTSPEED headset support (Centurion 0x50 transport variant) 2026-05-10 15:39:16 -07:00
keysyms keysymdef: Rename key symbols 2024-10-11 07:42:38 -04:00
logitech_receiver Guard Centurion feature lookups against HID++ 2.0 enum collisions 2026-05-10 15:39:17 -07:00
solaar Fix G522 0x50 Centurion init failure and protocol version crash 2026-05-10 15:39:17 -07:00