aboutsummaryrefslogtreecommitdiff
path: root/sound/decoders/raw.cpp
diff options
context:
space:
mode:
authorMax Horn2010-10-18 18:55:24 +0000
committerMax Horn2010-10-18 18:55:24 +0000
commit6175c2bb190c1ef8280852a5ac01752666ee0de9 (patch)
tree8d279da8a4a0f18f28f1c0344913443571e34148 /sound/decoders/raw.cpp
parentd69a63c14506a2d7182f4193a922cf6bd06c857b (diff)
downloadscummvm-rg350-6175c2bb190c1ef8280852a5ac01752666ee0de9.tar.gz
scummvm-rg350-6175c2bb190c1ef8280852a5ac01752666ee0de9.tar.bz2
scummvm-rg350-6175c2bb190c1ef8280852a5ac01752666ee0de9.zip
SCUMM: Fix potential bug in ScummEngine::resStrLen.
In particular, it might happen that ScummEngine::resStrLen is called while the _scriptPointer is stale. In that case, it would be working with the stale pointer. If the code calling it then uses fetchScript*() methods to read the string whose length was just computed, then it would read potentially *different* data (e.g. copyScriptString or loadPtrToResource could have been affected). I am not sure if this actually could have caused bugs somewhere; it might even be provable that a script relocation cannot happen in all places that invoke resStrLen. But for now it's much easier to make the code safe than to verify that theory ;). Also simplified some related code. svn-id: r53572
Diffstat (limited to 'sound/decoders/raw.cpp')
0 files changed, 0 insertions, 0 deletions