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 usbg_write_string off by one error #18

Merged
merged 1 commit into from
Dec 11, 2017

Conversation

agners
Copy link
Contributor

@agners agners commented Dec 7, 2017

This fixes #14.

The helper usbg_write_string() adds one to the length of the provided
string. This leads to usbg_write_buf() writting also a null terminator
to the kernel which is not necessary/wrong. Provide usbg_write_buf
the real string length.

Signed-off-by: Stefan Agner <[email protected]>
[Add missing () to function names in commit msg]
Signed-off-by: Krzysztof Opasiak <[email protected]>
@kopasiak kopasiak force-pushed the fix_usbg_write_string branch from 70b1273 to ad44340 Compare December 11, 2017 21:41
@kopasiak kopasiak merged commit ad44340 into linux-usb-gadgets:master Dec 11, 2017
@kopasiak
Copy link
Collaborator

Merged. Thanks.

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.

usbg_disable_gadget() doesn't work
2 participants