From 6b6e6c92c7c797560745651c1b16f1b5764bf297 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 13 Dec 2012 00:02:22 -0500 Subject: COMMON: Fix potential uninitialized memory usage --- common/macresman.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/macresman.cpp') diff --git a/common/macresman.cpp b/common/macresman.cpp index f2f020c6de..00562f746a 100644 --- a/common/macresman.cpp +++ b/common/macresman.cpp @@ -360,8 +360,8 @@ bool MacResManager::load(SeekableReadStream &stream) { _mapLength = stream.readUint32BE(); // do sanity check - if (_dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() || - _dataLength + _mapLength > (uint32)stream.size()) { + if (stream.eos() || _dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() || + _dataLength + _mapLength > (uint32)stream.size()) { _resForkOffset = -1; _mode = kResForkNone; return false; -- cgit v1.2.3