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

fix check of usb_hid.Device out_report_length #4819

Merged
merged 1 commit into from
May 28, 2021

Conversation

dhalbert
Copy link
Collaborator

  • The out_report_length arg for the usb_hid.Device constructor was checked to be 1-255 instead of 0-255. There was also a bug of what type the arg was, which meant that an arg of 0 was interpreted as 1, so the check was not triggered. Fixed.
  • Check the the report_id_index is in range, not past the end of the report.

Tested by @ATMakersBill.

@dhalbert dhalbert requested review from tannewt and jepler May 28, 2021 01:33
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No testing performed, but seems to do what the PR description says.

@dhalbert dhalbert merged commit fdc7f5f into adafruit:main May 28, 2021
@dhalbert dhalbert deleted the fix-out_report_length branch May 28, 2021 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants