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 bug in PackReport #534

Merged
merged 1 commit into from
Aug 24, 2020
Merged

fix bug in PackReport #534

merged 1 commit into from
Aug 24, 2020

Conversation

ebadger
Copy link
Contributor

@ebadger ebadger commented Aug 22, 2020

Data is pointer to array of HID_DATA structure.
Function advances pointer as it packs the report buffer.
At end of process in success condition, the function attempts to walk the array a second time and update the IsDataSet member for the HID_DATA elements that were packed.

What it's actually doing in the second pass is writing unexpected memory locations.
Fix is to store the head of the array and move back before walking again to set the bits.

Data is pointer to array of HID_DATA structure.
Function advances pointer as it packs the report buffer.
At end of process the function attempts to go back through the buffer and update the IsDataSet member.
What it's actually doing is writing unexpected memory locations.

Fix is to store the head of the array and move back before walking again to set the bits.
@barrygolden barrygolden merged commit aaeca58 into microsoft:master Aug 24, 2020
@barrygolden
Copy link
Member

@ebadger, PR is 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.

2 participants