From 9d087cb314490246a21a4e0ef57b1b126e3e3ad4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 27 Apr 2013 08:46:24 +0300 Subject: AGI: Null terminate string. CID 1003890 --- engines/agi/saveload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index ea102bf0d4..c449f076e7 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -678,7 +678,7 @@ int AgiEngine::selectSlot() { switch (key) { case KEY_ENTER: rc = active; - strncpy(_game.strings[MAX_STRINGS], desc[i], MAX_STRINGLEN); + Common::strlcpy(_game.strings[MAX_STRINGS], desc[i], MAX_STRINGLEN); debugC(8, kDebugLevelMain | kDebugLevelInput, "Button pressed: %d", rc); exitSelectSlot = true; break; -- cgit v1.2.3