diff options
author | Torbjörn Andersson | 2013-07-06 14:03:31 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2013-07-06 14:03:31 +0200 |
commit | 29bc36d0708f228f18ed7a75bcadb72fed9fb55a (patch) | |
tree | 873165c291d5cf3e2771ca767a66b6d356fd158f /engines/scumm/imuse | |
parent | 1ed1106cb26075ade504e342cfea32a6266c1ea1 (diff) | |
download | scummvm-rg350-29bc36d0708f228f18ed7a75bcadb72fed9fb55a.tar.gz scummvm-rg350-29bc36d0708f228f18ed7a75bcadb72fed9fb55a.tar.bz2 scummvm-rg350-29bc36d0708f228f18ed7a75bcadb72fed9fb55a.zip |
SCUMM: Fix initGM() buffer overflow (CID 1032513)
We're clearly using 12 bytes, not 11.
Diffstat (limited to 'engines/scumm/imuse')
-rw-r--r-- | engines/scumm/imuse/imuse.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index 12ebfef9b7..7f771a0265 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -1483,7 +1483,7 @@ void IMuseInternal::initMT32(MidiDriver *midi) { } void IMuseInternal::initGM(MidiDriver *midi) { - byte buffer[11]; + byte buffer[12]; int i; // General MIDI System On message @@ -1540,7 +1540,7 @@ void IMuseInternal::initGM(MidiDriver *midi) { // Set Channels 1-16 Reverb to 64, which is the // equivalent of MT-32 default Reverb Level 5 for (i = 0; i < 16; ++i) - midi->send((64 << 16) | (91 << 8) | (0xB0 | i)); + midi->send((64 << 16) | (91 << 8) | (0xB0 | i)); debug(2, "GM Controller 91 Change: Channels 1-16 Reverb Level is 64"); // Set Channels 1-16 Pitch Bend Sensitivity to |