[Scummvm-git-logs] scummvm master -> 6854b155fc03a07cfe7a251e57f92d972664578d
lephilousophe
noreply at scummvm.org
Sun Sep 18 11:29:29 UTC 2022
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:
6854b155fc CRYOMNI3D: Prevent a possible out of bound memory access
Commit: 6854b155fc03a07cfe7a251e57f92d972664578d
https://github.com/scummvm/scummvm/commit/6854b155fc03a07cfe7a251e57f92d972664578d
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-18T13:28:50+02:00
Commit Message:
CRYOMNI3D: Prevent a possible out of bound memory access
Changed paths:
engines/cryomni3d/versailles/logic.cpp
diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp
index a8f73c1cdfd..4dd66cb907a 100644
--- a/engines/cryomni3d/versailles/logic.cpp
+++ b/engines/cryomni3d/versailles/logic.cpp
@@ -3229,6 +3229,10 @@ void CryOmni3DEngine_Versailles::drawBombLetters(Graphics::ManagedSurface &surfa
} else {
for (uint i = 0; i < bombPasswordLength; i++) {
uint letterId = _bombAlphabet.find(bombPossibilites[i][bombCurrentLetters[i]]);
+ if (letterId == _bombAlphabet.npos) {
+ // Should not happen
+ continue;
+ }
const Graphics::Surface &letter = bmpLetters[letterId];
Common::Point dst(kBombLettersPos[table][i][0], kBombLettersPos[table][i][1]);
surface.transBlitFrom(letter, dst);
More information about the Scummvm-git-logs
mailing list