Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read report lengths from descriptor on Windows #182

Merged
merged 2 commits into from
May 14, 2020

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented May 13, 2020

Extracts input and output report lengths from the report descriptor
using HidP_GetCaps.

Since the previous implementation rejected all devices with report
lengths other than 64 bytes (+ report ID), we can reject devices with
invalid report lengths without affecting backward compatibility.

This has been tested lightly tested with both a 64 byte and a 62 byte FIDO device, further testing will be done after #181 has been resolved.

@fmeum fmeum force-pushed the fhenneke_rpt_size_win branch 2 times, most recently from 6b9d1df to 8d67b36 Compare May 14, 2020 10:40
@fmeum
Copy link
Contributor Author

fmeum commented May 14, 2020

I have now tested this successfully. Testing showed that previously debug warnings would be emitted for non-FIDO devices, which has now been fixed.

src/hid_win.c Outdated Show resolved Hide resolved
Extracts input and output report lengths from the report descriptor
using HidP_GetCaps.

Since the previous implementation rejected all devices with report
lengths other than 64 bytes (+ report ID), we can reject devices with
invalid report lengths without affecting backward compatibility.
@martelletto
Copy link
Contributor

Thanks! Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants