[Scummvm-cvs-logs] scummvm master -> 38071bc5c5d2b2543dc23b38e1b810d791bf4a26
eriktorbjorn
eriktorbjorn at telia.com
Sun Aug 4 09:20:52 CEST 2013
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
38071bc5c5 MORTEVIELLE: Fix out-of-bounds read
Commit: 38071bc5c5d2b2543dc23b38e1b810d791bf4a26
https://github.com/scummvm/scummvm/commit/38071bc5c5d2b2543dc23b38e1b810d791bf4a26
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-08-04T00:14:11-07:00
Commit Message:
MORTEVIELLE: Fix out-of-bounds read
This should be sufficient. At this point, cy is at most 23, and if
cx is 41 it's either 23 or less than 20. That means ix is either
46 or less than 43. If it's less than 43, there is no out of bounds
access, and now we look at the special case first.
This was a Coverity issue, but for some reason I don't see any CID
for it.
Changed paths:
engines/mortevielle/actions.cpp
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index 73d258a..361917d 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -1448,7 +1448,7 @@ void MortevielleEngine::fctDiscuss() {
displayQuestionText(lib[choice], 1);
questionAsked[choice] = ! questionAsked[choice];
}
- if ((_coreVar._availableQuestion[ix] == '*') || (ix == 46)) {
+ if ((ix == 46) || (_coreVar._availableQuestion[ix] == '*')) {
posY = ((ix - 1) % 23) << 3;
if (ix > 23)
posX = 320;
More information about the Scummvm-git-logs
mailing list