[Scummvm-cvs-logs] SF.net SVN: scummvm:[50269] scummvm/trunk/engines/sci/engine/vm.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Jun 25 18:04:37 CEST 2010
Revision: 50269
http://scummvm.svn.sourceforge.net/scummvm/?rev=50269&view=rev
Author: m_kiewitz
Date: 2010-06-25 16:04:37 +0000 (Fri, 25 Jun 2010)
Log Message:
-----------
SCI: when writing to a temp, check for segment 0xFFFF and remove it. This fixes a false-positive uninitialized read error in room 44 sq1
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/vm.cpp
Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp 2010-06-25 15:28:24 UTC (rev 50268)
+++ scummvm/trunk/engines/sci/engine/vm.cpp 2010-06-25 16:04:37 UTC (rev 50269)
@@ -273,6 +273,13 @@
}
}
+ // If we are writing an uninitialized value into a temp, we remove the uninitialized segment
+ // this happens at least in sq1/room 44 (slot-machine), because a send is missing parameters, then
+ // those parameters are taken from uninitialized stack and afterwards they are copied back into temps
+ // if we don't remove the segment, we would get false-positive uninitialized reads later
+ if (type == VAR_TEMP && value.segment == 0xffff)
+ value.segment = 0;
+
r[index] = value;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list