aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-28 00:36:24 +0100
committerJohannes Schickel2015-12-28 00:36:24 +0100
commitc9bda09bc0900aac6d1cd96cd3f69b6a1761df70 (patch)
tree49bdb65ce5e42d45c7fed120e4844e223f00c592
parentde0b5b62ab9171fc9839b7804a0f2b56fe0da9a9 (diff)
downloadscummvm-rg350-c9bda09bc0900aac6d1cd96cd3f69b6a1761df70.tar.gz
scummvm-rg350-c9bda09bc0900aac6d1cd96cd3f69b6a1761df70.tar.bz2
scummvm-rg350-c9bda09bc0900aac6d1cd96cd3f69b6a1761df70.zip
CINE: Prevent buffer overruns in scummVMSaveLoadDialog.
-rw-r--r--engines/cine/various.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index fa05369f8d..cd877a3295 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -365,8 +365,7 @@ int CineEngine::scummVMSaveLoadDialog(bool isSave) {
if (slot < 0)
return true;
- char saveFileName[256];
- sprintf(saveFileName, "%s.%1d", _targetName.c_str(), slot);
+ Common::String saveFileName(Common::String::format("%s.%1d", _targetName.c_str(), slot));
if (isSave) {
Common::String tmp = Common::String::format("%s.dir", _targetName.c_str());