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

Out-of-bounds write when managing voice groups #349

Open
TechPizzaDev opened this issue Jul 23, 2022 · 0 comments
Open

Out-of-bounds write when managing voice groups #349

TechPizzaDev opened this issue Jul 23, 2022 · 0 comments

Comments

@TechPizzaDev
Copy link
Contributor

TechPizzaDev commented Jul 23, 2022

This code seems to write a zero outside of the allocated memory for the voice group when on the last index.
A possible solution here would be to overallocate one more element for voice groups:

mVoiceGroup[c][i + 1] = 0;


Another interesting write occurs when trimming a group, which can possibly erase the last voice in a group.
Not sure of a solution on this one. Maybe just removing it would be enough:

mVoiceGroup[c][mVoiceGroup[c][0] - 1] = 0;

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