[Scummvm-cvs-logs] SF.net SVN: scummvm:[43419] scummvm/branches/branch-1-0-0/engines/scumm/he/ script_v60he.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sun Aug 16 03:36:48 CEST 2009
Revision: 43419
http://scummvm.svn.sourceforge.net/scummvm/?rev=43419&view=rev
Author: Kirben
Date: 2009-08-16 01:36:48 +0000 (Sun, 16 Aug 2009)
Log Message:
-----------
Backport fix for overflow in convertFilePath().
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/engines/scumm/he/script_v60he.cpp
Modified: scummvm/branches/branch-1-0-0/engines/scumm/he/script_v60he.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/he/script_v60he.cpp 2009-08-16 01:03:09 UTC (rev 43418)
+++ scummvm/branches/branch-1-0-0/engines/scumm/he/script_v60he.cpp 2009-08-16 01:36:48 UTC (rev 43419)
@@ -115,9 +115,10 @@
int r = 0;
if (dst[len - 3] == 's' && dst[len - 2] == 'g') { // Save Game File
// Change filename prefix to target name, for save game files.
- char saveName[20];
+ char saveName[40];
+ memset(saveName, 0, sizeof(saveName));
sprintf(saveName, "%s.sg%c", _targetName.c_str(), dst[len - 1]);
- memcpy(dst, saveName, 20);
+ memcpy(dst, saveName, 40);
} else if (dst[0] == '.' && dst[1] == '/') { // Game Data Path
// The default game data path is set to './' by ScummVM
r = 2;
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