[Scummvm-git-logs] scummvm master -> 1ef11b17253fe0117a645ea5efd29a1490c0ec85
sev-
noreply at scummvm.org
Mon Dec 5 19:21:17 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:
1ef11b1725 HDB: Fix out of bounds access in Map 19
Commit: 1ef11b17253fe0117a645ea5efd29a1490c0ec85
https://github.com/scummvm/scummvm/commit/1ef11b17253fe0117a645ea5efd29a1490c0ec85
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-12-05T20:21:02+01:00
Commit Message:
HDB: Fix out of bounds access in Map 19
Changed paths:
engines/hdb/map.cpp
diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp
index 8337952999b..d9e5adffa10 100644
--- a/engines/hdb/map.cpp
+++ b/engines/hdb/map.cpp
@@ -639,6 +639,11 @@ bool Map::load(Common::SeekableReadStream *stream) {
// Scan all icons and init all Entities
g_hdb->setupProgressBar(_iconNum);
for (int i = 0; i < _iconNum; i++) {
+ if (_iconList[i].icon == 65535) {
+ warning("Map::load(): Icon index at pos %d is too big: %d", i, _iconList[i].icon);
+ continue;
+ }
+
debug(5, "%s, %d,%d,%s,%s,%s,%d,%d,%d,%d", AIType2Str(aiInfo[_iconList[i].icon].type), _iconList[i].x, _iconList[i].y, _iconList[i].funcInit,
_iconList[i].funcAction, _iconList[i].funcUse, _iconList[i].dir, _iconList[i].level,
_iconList[i].value1, _iconList[i].value2);
More information about the Scummvm-git-logs
mailing list