Skip to content

Commit

Permalink
KYRA: (EOB) - fix out of bounds mem access
Browse files Browse the repository at this point in the history
  • Loading branch information
athrxx authored and Johannes Schickel committed Dec 26, 2011
1 parent c8665d0 commit 514c776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/kyra/items_eob.cpp
Expand Up @@ -58,8 +58,8 @@ void EobCoreEngine::loadItemDefs() {
s = _res->createReadStream("itemtype.dat");
uint16 numTypes = s->readUint16LE();

_itemTypes = new EobItemType[numTypes];
memset(_itemTypes, 0, sizeof(EobItemType) * numTypes);
_itemTypes = new EobItemType[65];
memset(_itemTypes, 0, sizeof(EobItemType) * 65);

for (int i = 0; i < numTypes; i++) {
_itemTypes[i].invFlags = s->readUint16LE();
Expand Down

0 comments on commit 514c776

Please sign in to comment.