diff options
author | Travis Howell | 2010-10-23 02:18:08 +0000 |
---|---|---|
committer | Travis Howell | 2010-10-23 02:18:08 +0000 |
commit | afd677c2c7a7e6dd088f64ff77bcb4fa154b4cc4 (patch) | |
tree | 16eb0b4553135c7b005163437cadf58d7384d74a /engines/scumm/he/script_v100he.cpp | |
parent | a82b0435a2f6777fd91c85dc0058c9dbd2568306 (diff) | |
download | scummvm-rg350-afd677c2c7a7e6dd088f64ff77bcb4fa154b4cc4.tar.gz scummvm-rg350-afd677c2c7a7e6dd088f64ff77bcb4fa154b4cc4.tar.bz2 scummvm-rg350-afd677c2c7a7e6dd088f64ff77bcb4fa154b4cc4.zip |
SCUMM: Fix buffer overflow, that was causing crashes when saving in Backyard Baseball 2001/2003.
svn-id: r53726
Diffstat (limited to 'engines/scumm/he/script_v100he.cpp')
-rw-r--r-- | engines/scumm/he/script_v100he.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 3555f55d95..37861b4747 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -1623,13 +1623,11 @@ void ScummEngine_v100he::o100_roomOps() { case 137: byte buffer[256]; - int r; copyScriptString((byte *)buffer, sizeof(buffer)); - r = convertFilePath(buffer, sizeof(buffer)); - memcpy(_saveLoadFileName, buffer + r, sizeof(buffer) - r); - debug(1, "o100_roomOps: case 137: filename %s", _saveLoadFileName); + _saveLoadFileName = (char *)buffer + convertFilePath(buffer, sizeof(buffer)); + debug(1, "o100_roomOps: case 137: filename %s", _saveLoadFileName.c_str()); _saveLoadFlag = pop(); _saveLoadSlot = 255; |