djtuBIG-MaliceX / opl3-synth-driver

Forked from Alexey Khohkolov's (khokh2001) OPL3 synth. This intends to improve onto the base driver to include extended MIDI support and other improvements to the playback component.
5 stars 0 forks source link

fix some crashes by buffer overflow (ticket by @jpcima - migrated from BitBucket) #41

Closed djtuBIG-MaliceX closed 4 years ago

djtuBIG-MaliceX commented 4 years ago

Raised by @jpcima at the old BitBucket project repo on 2018‑03‑06,

Accessing the voice array at

wTemp2=wTemp+3
can write out of bounds. This patch should fix it.

Also, there is an invalid read access at another place, where it must be guarded by a condition to check if it's in drum mode.

please note: I did not test it in normal context, but by integrating the midi driver into another software.

djtuBIG-MaliceX commented 4 years ago

Old review comments (they still apply) can be found here: https://bitbucket.org/djtubig-malicex/opl3-synth-driver/pull-requests/1/fix-some-crashes-by-buffer-overflow/diff

jpcima commented 4 years ago

Hello, sorry that I forgot to do this. The notification has reached me but I've been busy and then forgot.

djtuBIG-MaliceX commented 4 years ago

All good. I'll sort the rest of it out on this branch and merge changes later.