soloud
soloud copied to clipboard
Out-of-bounds write when managing voice groups
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: https://github.com/jarikomppa/soloud/blob/1157475881da0d7f76102578255b937c7d4e8f57/src/core/soloud_core_voicegroup.cpp#L139
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: https://github.com/jarikomppa/soloud/blob/1157475881da0d7f76102578255b937c7d4e8f57/src/core/soloud_core_voicegroup.cpp#L236