Fix build warning. Replace strncpy with memcpy
authorj-h.choi <j-h.choi@samsung.com>
Mon, 5 Jul 2021 04:26:23 +0000 (13:26 +0900)
committer조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Tue, 10 Aug 2021 23:39:39 +0000 (08:39 +0900)
Change-Id: Ic9f239132fd1a2793176cd85ba00b8c553bd056a

NativeLauncher/launcher/lib/core_runtime.cc

index 13efc05..f78dd54 100644 (file)
@@ -544,7 +544,7 @@ int CoreRuntime::launch(const char* appId, const char* root, const char* path, i
                // set profile.data path and collect/use it if it non-exists/exists.
                if (profile) {
                        char multiCoreJitProfile[strlen(localDataPath) + strlen(PROFILE_BASENAME) + 1];
-                       strncpy(multiCoreJitProfile, localDataPath, strlen(localDataPath) + 1);
+                       memcpy(multiCoreJitProfile, localDataPath, strlen(localDataPath) + 1);
                        strncat(multiCoreJitProfile, PROFILE_BASENAME, strlen(PROFILE_BASENAME));
 
                        setEnvironmentVariable("COMPlus_MultiCoreJitProfile", multiCoreJitProfile);