[Scummvm-tracker] [ScummVM] #9757: SCI: Access uninitialised memory in games with digital sound effects (was: Access uninitialised memory when starting KQ6)

Colin Snover trac at scummvm.org
Sun May 7 06:12:45 CEST 2017


#9757: SCI: Access uninitialised memory in games with digital sound effects
---------------------+-------------------------
  Reporter:  criezy  |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  normal  |  Component:  Engine: SCI
Resolution:          |   Keywords:
      Game:          |
---------------------+-------------------------

Comment (by csnover):

 The `MusicEntry::time` member is not initialized for sound effects that
 use sampled digital audio (`MusicEntry::isSample == true`), so any game
 that plays sampled sounds will raise this warning when (1) the list of
 sounds is sorted, and (2) there are two sounds with identical priorities,
 and (3) one or more of the sounds is a digital sample.

 A possible solution to this would be to change the condition at the end of
 `SoundCommandParser::initSoundResource` to allow sampled `MusicEntry`s to
 be initialised by `SciMusic::soundInitSnd`, and then change `soundInitSnd`
 to just set the sampled MusicEntry’s `time` property and return. I don’t
 know this code well enough to say whether or not this is a ‘correct’ fix
 though.

--
Ticket URL: <https://bugs.scummvm.org/ticket/9757#comment:1>
ScummVM <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list