Core/DataStores: Fixed out of bounds memory access in sparse db2 loader

Closes #23900
This commit is contained in:
Shauren
2019-11-03 20:02:10 +01:00
parent 9ea577da13
commit e32d888c28

View File

@@ -1023,7 +1023,7 @@ bool DB2FileLoaderSparseImpl::LoadCatalogData(DB2FileSource* source, uint32 sect
{
std::size_t oldCopyTableSize = _copyTable.size();
_copyTable.resize(oldCopyTableSize + _sections[section].CopyTableCount);
if (!source->Read(&_copyTable[oldSize], sizeof(DB2RecordCopy) * _sections[section].CopyTableCount))
if (!source->Read(&_copyTable[oldCopyTableSize], sizeof(DB2RecordCopy) * _sections[section].CopyTableCount))
return false;
}