Skip to content

fix bug in PackReport#534

Merged
1 commit merged intomicrosoft:masterfrom
ebadger:master
Aug 24, 2020
Merged

fix bug in PackReport#534
1 commit merged intomicrosoft:masterfrom
ebadger:master

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.
@ghost ghost merged commit aaeca58 into microsoft:master Aug 24, 2020
@ghost
Copy link

ghost commented Aug 24, 2020

@ebadger, PR is merged. Thanks!

This pull request was closed.
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.

1 participant