aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTravis Howell2009-03-07 13:29:11 +0000
committerTravis Howell2009-03-07 13:29:11 +0000
commit32e49fe2cf9c9fc1036b583dd39b8e2c351f81b4 (patch)
treed44d22e1e49c0b7ac7199e73d0797b392646e8ab /engines/agos
parentdd10e99c2eb800425b9e10e1813531731f319dde (diff)
downloadscummvm-rg350-32e49fe2cf9c9fc1036b583dd39b8e2c351f81b4.tar.gz
scummvm-rg350-32e49fe2cf9c9fc1036b583dd39b8e2c351f81b4.tar.bz2
scummvm-rg350-32e49fe2cf9c9fc1036b583dd39b8e2c351f81b4.zip
Fix buffer overflow in matchSaveGame().
svn-id: r39182
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/saveload.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 0a55071d26..83165312df 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -256,9 +256,10 @@ bool AGOSEngine::confirmOverWrite(WindowBlock *window) {
int16 AGOSEngine::matchSaveGame(const char *name, uint16 max) {
Common::InSaveFile *in;
- char dst[8];
+ char dst[10];
uint16 slot;
+ memset(dst, 0, sizeof(dst));
for (slot = 0; slot < max; slot++) {
if ((in = _saveFileMan->openForLoading(genSaveName(slot)))) {
in->read(dst, 8);