[Scummvm-tracker] [ScummVM :: Bugs] #13908: SCUMM: INDY3 (MAC): ASAN crash in Player_V2Base::next_freqs() in Castle Brunwald
ScummVM :: Bugs
trac at scummvm.org
Sun Nov 19 09:24:48 UTC 2023
#13908: SCUMM: INDY3 (MAC): ASAN crash in Player_V2Base::next_freqs() in Castle
Brunwald
-------------------------------------------------+-------------------------
Reporter: dwatteau | Owner: (none)
Type: defect | Status: new
Priority: high | Component: Engine:
| SCUMM
Version: | Resolution:
Keywords: asan,crash,castle brunwald,macintosh | Game: Indiana
| Jones 3
-------------------------------------------------+-------------------------
Comment (by eriktorbjorn):
When it reaches this line, right at the ASAN crash in Mac Last Crusade:
{{{
channel->d.freq =
(int)(freqmod_table[channel->d.freqmod_table +
(channel->d.freqmod_offset >> 4)])
* (int)channel->d.freqmod_multiplier / 256
+ channel->d.base_freq;
}}}
the value of freqmod_table is 512 and freqmod_offset is 12328. That means
it's accessing freqmod_table[1282], which is outside the array. The naive
fix would of course be to clip the index to the size of the array, but
maybe there's something more insidious going on here?
--
Ticket URL: <https://bugs.scummvm.org/ticket/13908#comment:6>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list