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

HID.sendReport - Stack overflow #134

Open
DesperateProgrammer opened this issue Jan 14, 2022 · 0 comments
Open

HID.sendReport - Stack overflow #134

DesperateProgrammer opened this issue Jan 14, 2022 · 0 comments

Comments

@DesperateProgrammer
Copy link

memcpy(&p[1], data, len);

The length argument is unchecked and will cause a stack overflow if >63.
Allthough most HID messages are less than 63 bytes long, yet it is possible for HID reports to exceed this limit and occupy multiple USB interrupt frames. Sending such reports would crash the sketch.

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

No branches or pull requests

1 participant