From 95728f48904ad20f0a36b33d0bd30e4bccc9fa21 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 16 Mar 2014 14:24:45 +0100 Subject: CINE: Avoid possible string buffer overrun by using strlcpy and strlcat --- engines/cine/bg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/cine/bg.cpp') diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp index 3b80a9c037..ce808e0f6a 100644 --- a/engines/cine/bg.cpp +++ b/engines/cine/bg.cpp @@ -48,7 +48,7 @@ byte loadCtFW(const char *ctName) { } if (currentCtName != ctName) - strcpy(currentCtName, ctName); + Common::strlcpy(currentCtName, ctName, sizeof(currentCtName)); ptr = dataPtr = readBundleFile(foundFileIdx); @@ -75,7 +75,7 @@ byte loadCtOS(const char *ctName) { } if (currentCtName != ctName) - strcpy(currentCtName, ctName); + Common::strlcpy(currentCtName, ctName, sizeof(currentCtName)); ptr = dataPtr = readBundleFile(foundFileIdx); -- cgit v1.2.3