From a57aa559991dc47b0d3633b0a59ffff35358b236 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 11 May 2016 12:32:18 +0200 Subject: TINSEL: Safer string manipulation --- engines/tinsel/dialogs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/tinsel/dialogs.cpp') diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index 4bc28ffb53..ad20253b9c 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -1671,10 +1671,10 @@ static void Select(int i, bool force) { #else // Current description with cursor appended if (cd.box[i].boxText != NULL) { - strcpy(g_sedit, cd.box[i].boxText); - strcat(g_sedit, sCursor); + Common::strlcpy(g_sedit, cd.box[i].boxText, SG_DESC_LEN+2); + Common::strlcat(g_sedit, sCursor, SG_DESC_LEN+2); } else { - strcpy(g_sedit, sCursor); + Common::strlcpy(g_sedit, sCursor, SG_DESC_LEN+2); } #endif -- cgit v1.2.3