diff options
author | Eugene Sandulenko | 2013-10-07 23:25:41 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-08 00:11:18 +0300 |
commit | ae6f205b93a2ffc8e07c1d7f25e6e9d942c5a965 (patch) | |
tree | 0a24c19996f4ba6343574d79411caa57eb26e0f0 /engines/sword25/kernel | |
parent | 1fd58f7f2e60fa972c77bbf825631214dd4ef40e (diff) | |
download | scummvm-rg350-ae6f205b93a2ffc8e07c1d7f25e6e9d942c5a965.tar.gz scummvm-rg350-ae6f205b93a2ffc8e07c1d7f25e6e9d942c5a965.tar.bz2 scummvm-rg350-ae6f205b93a2ffc8e07c1d7f25e6e9d942c5a965.zip |
SWORD25: Fix potential buffer overrun. CID 1003865
Diffstat (limited to 'engines/sword25/kernel')
-rw-r--r-- | engines/sword25/kernel/persistenceservice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp index 27d669caa1..df26da7800 100644 --- a/engines/sword25/kernel/persistenceservice.cpp +++ b/engines/sword25/kernel/persistenceservice.cpp @@ -59,7 +59,7 @@ static const int VERSIONNUM = 2; char gameTarget[MAX_SAVEGAME_SIZE]; void setGameTarget(const char *target) { - strncpy(gameTarget, target, MAX_SAVEGAME_SIZE); + strncpy(gameTarget, target, MAX_SAVEGAME_SIZE - 1); } static Common::String generateSavegameFilename(uint slotID) { |