Fix buffer overflow in matchSaveGame().

svn-id: r39182
This commit is contained in:
Travis Howell 2009-03-07 13:29:11 +00:00
parent dd10e99c2e
commit 32e49fe2cf

View File

@ -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);