COMMON: In getDataFork use SafeSeekableSubReadStream

It can be opened several times so re-seeking makes sense
This commit is contained in:
Vladimir Serbinenko 2022-11-29 18:32:26 +01:00
parent 3ed46d3484
commit b8f3bc2732

View File

@ -692,7 +692,7 @@ SeekableReadStream *MacResManager::getDataFork() {
if (_mode == kResForkMacBinary) {
_stream->seek(MBI_DFLEN);
uint32 dataSize = _stream->readUint32BE();
return new SeekableSubReadStream(_stream, MBI_INFOHDR, MBI_INFOHDR + dataSize);
return new SafeSeekableSubReadStream(_stream, MBI_INFOHDR, MBI_INFOHDR + dataSize);
}
File *file = new File();