From cfbc8be75735370a4e87525a9b69b4556e24b9a9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 24 Apr 2013 01:07:34 +0300 Subject: SCUMM: Fix non-terminated string. CID 1003867 --- engines/scumm/script_v4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp index 1de9f08168..ec3ac4b00f 100644 --- a/engines/scumm/script_v4.cpp +++ b/engines/scumm/script_v4.cpp @@ -415,7 +415,7 @@ void ScummEngine_v4::o4_saveLoadGame() { char* ptr; int firstSlot = (_game.id == GID_LOOM) ? STRINGID_SAVENAME1_LOOM : STRINGID_SAVENAME1; ptr = (char *)getStringAddress(slot + firstSlot - 1); - strncpy(name, ptr, sizeof(name)); + Common::strlcpy(name, ptr, sizeof(name)); } if (savePreparedSavegame(slot, name)) -- cgit v1.2.3