mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #13499 from hyperlogic/bug-fix/space-process-resets-crash
Guard against memory corruption in Space::processResets()
This commit is contained in:
commit
3435e7ca87
1 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,11 @@ void Space::processResets(const Transaction::Resets& transactions) {
|
|||
for (auto& reset : transactions) {
|
||||
// Access the true item
|
||||
auto proxyID = std::get<0>(reset);
|
||||
|
||||
// Guard against proxyID being past the end of the list.
|
||||
if (proxyID < 0 || proxyID >= (int32_t)_proxies.size() || proxyID >= (int32_t)_owners.size()) {
|
||||
continue;
|
||||
}
|
||||
auto& item = _proxies[proxyID];
|
||||
|
||||
// Reset the item with a new payload
|
||||
|
|
Loading…
Reference in a new issue