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

_get_interface maybe process one command twice #3659

Open
egbert-h opened this issue Jun 5, 2020 · 0 comments
Open

_get_interface maybe process one command twice #3659

egbert-h opened this issue Jun 5, 2020 · 0 comments

Comments

@egbert-h
Copy link
Contributor

@egbert-h egbert-h commented Jun 5, 2020

line 261 ~ 265 in ud_core.c/usbdevice_core.c maybe process the command in setup twice if the request code is the same with USB_REQ_GET_INTERFACE which is 0xA. It will result in unexpected behavior during transfer. The solution is removing line 261 ~ 265.

I ran into this issue with _interface_handler() in hid.c after the get_interface request is received.
the request code is 0xA which the definition is USB_REQ_GET_INTERFACE and USB_HID_REQ_SET_IDLE.

This issue exists in the implementation of set_interface request also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.