mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
CRYOMNI3D: Prevent a possible out of bound memory access
This commit is contained in:
parent
f04b3f6841
commit
6854b155fc
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user