[Scummvm-cvs-logs] SF.net SVN: scummvm:[40321] scummvm/trunk/engines/sci/engine/savegame.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue May 5 14:00:51 CEST 2009
Revision: 40321
http://scummvm.svn.sourceforge.net/scummvm/?rev=40321&view=rev
Author: fingolfin
Date: 2009-05-05 12:00:51 +0000 (Tue, 05 May 2009)
Log Message:
-----------
SCI: Fixed out of bounds access in (still incomplete?) string frags code
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/savegame.cpp
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2009-05-05 10:54:56 UTC (rev 40320)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2009-05-05 12:00:51 UTC (rev 40321)
@@ -856,8 +856,8 @@
str = &retval->sys_strings->strings[SYS_STRING_SAVEDIR];
internal_stringfrag_strncpy(s, str->value, s->sys_strings->strings[SYS_STRING_SAVEDIR].value, str->max_size);
- str->value[str->max_size].segment = s->string_frag_segment; // Make sure to terminate
- str->value[str->max_size].offset &= 0xff00; // Make sure to terminate
+ str->value[str->max_size - 1].segment = s->string_frag_segment; // Make sure to terminate
+ str->value[str->max_size - 1].offset &= 0xff00; // Make sure to terminate
// Time state:
retval->last_wait_time = g_system->getMillis();
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