[Scummvm-cvs-logs] SF.net SVN: scummvm: [21024] scummvm/trunk/engines/scumm/he/script_v72he.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Thu Mar 2 23:41:01 CET 2006
Revision: 21024
Author: kirben
Date: 2006-03-02 23:40:34 -0800 (Thu, 02 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=21024&view=rev
Log Message:
-----------
Read array bounds in checkArrayLimits() correctly on all systems
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/script_v72he.cpp
Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-03-03 06:25:59 UTC (rev 21023)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-03-03 07:40:34 UTC (rev 21024)
@@ -2041,7 +2041,7 @@
}
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
assert(ah);
- if (ah->dim2start > dim2start || ah->dim2end < dim2end || ah->dim1start > dim1start || ah->dim1end < dim1end) {
+ if ((int)FROM_LE_32(ah->dim2start) > dim2start || (int)FROM_LE_32(ah->dim2end) < dim2end || (int)FROM_LE_32(ah->dim1start) > dim1start || (int)FROM_LE_32(ah->dim1end) < dim1end) {
error("Invalid array access (%d,%d,%d,%d) limit (%d,%d,%d,%d)", dim2start, dim2end, dim1start, dim1end, ah->dim2start, ah->dim2end, ah->dim1start, ah->dim1end);
}
}
More information about the Scummvm-git-logs
mailing list