diff options
author | Sebastian Krzyszkowiak | 2019-06-17 19:47:17 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-06-17 22:11:14 +0300 |
commit | 373f0c91bec0bb5b3beba44159649a3b6003ffcd (patch) | |
tree | 7bbc27dba6dd00d2fb7b131ce98901e6f897d020 /engines/sludge | |
parent | b503401c45aaa4783d2087ed26caec57777cdec1 (diff) | |
download | scummvm-rg350-373f0c91bec0bb5b3beba44159649a3b6003ffcd.tar.gz scummvm-rg350-373f0c91bec0bb5b3beba44159649a3b6003ffcd.tar.bz2 scummvm-rg350-373f0c91bec0bb5b3beba44159649a3b6003ffcd.zip |
SLUDGE: fix use-after-free in PeopleManager::killMostPeople
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/people.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sludge/people.cpp b/engines/sludge/people.cpp index 2d293194da..6cc0ddbe33 100644 --- a/engines/sludge/people.cpp +++ b/engines/sludge/people.cpp @@ -837,7 +837,7 @@ void PeopleManager::killMostPeople() { for (OnScreenPersonList::iterator it = _allPeople->begin(); it != _allPeople->end(); ++it) { if (!((*it)->extra & EXTRA_NOREMOVE)) { OnScreenPerson *killPeople = (*it); - _allPeople->reverse_erase(it); + it = _allPeople->reverse_erase(it); // Gone from the list... now free some memory if (killPeople->continueAfterWalking) |