diff options
author | Colin Snover | 2017-01-05 12:22:22 -0600 |
---|---|---|
committer | Colin Snover | 2017-01-05 16:00:59 -0600 |
commit | 70d1edf615bf997261066b1601b7af823af9ca1e (patch) | |
tree | 8af339fd3689faf0dead641f50db6be6cd24e78e /engines/cruise/cell.cpp | |
parent | 3c170d630a377079d8432bbe945b78195437efa8 (diff) | |
download | scummvm-rg350-70d1edf615bf997261066b1601b7af823af9ca1e.tar.gz scummvm-rg350-70d1edf615bf997261066b1601b7af823af9ca1e.tar.bz2 scummvm-rg350-70d1edf615bf997261066b1601b7af823af9ca1e.zip |
SCI32: Add validity checks to kList iteration methods
In GK2, restoring a save game causes the segment manager to reset
in the middle of a kListFirstTrue call, which invalidates all
pointers and reg_ts to stored data. This means that when
kListFirstTrue tries to decrement the list recursion counter at
the end of iteration, it is writing to freed memory, potentially
resulting in heap corruption.
SCI3 added checks to prevent this from happening, but these checks
seem like they should have also been applied to some SCI2.1 games
as well (like GK2).
Since there should be no negative side-effect to this check, it
is applied universally to all SCI32 games.
Diffstat (limited to 'engines/cruise/cell.cpp')
0 files changed, 0 insertions, 0 deletions