[Scummvm-tracker] [ScummVM :: Bugs] #12258: AGS: Buffer overflow in AdLib driver at the start of Black Cauldron
ScummVM :: Bugs
trac at scummvm.org
Mon Mar 1 00:47:23 UTC 2021
#12258: AGS: Buffer overflow in AdLib driver at the start of Black Cauldron
-------------------+--------------------------
Reporter: criezy | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: AGS
Version: | Resolution:
Keywords: | Game:
-------------------+--------------------------
Comment (by criezy):
And debugger output:
{{{
frame #5: 0x0000000100f18e0c
scummvm`MidiDriver_ADLIB::adlibPlayNote(this=0x000000011a8ca100,
channel=1, note=0) at adlib.cpp:1920:29
1917 }
1918
1919 i = (notex << 3) + ((note >> 4) & 0x7);
-> 1920 adlibWrite(channel + 0xA0, g_noteFrequencies[i]);
1921 adlibWrite(channel + 0xB0, oct | 0x20);
1922 }
1923
(lldb) p i
(int) $1 = 2040
(lldb) p sizeof(g_noteFrequencies)
(unsigned long) $2 = 144
(lldb) p note
(int) $3 = 0
(lldb) p notex
(byte) $4 = '?'
(lldb) p (int)notex
(int) $5 = 255
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/12258#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list