From d2bb6ca268f172acff1f69a822a66d33a8bdf0b1 Mon Sep 17 00:00:00 2001 From: "j-h.choi" Date: Mon, 5 Jul 2021 13:26:23 +0900 Subject: [PATCH] Fix build warning. Replace strncpy with memcpy Change-Id: Ic9f239132fd1a2793176cd85ba00b8c553bd056a --- NativeLauncher/launcher/lib/core_runtime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NativeLauncher/launcher/lib/core_runtime.cc b/NativeLauncher/launcher/lib/core_runtime.cc index 13efc05..f78dd54 100644 --- a/NativeLauncher/launcher/lib/core_runtime.cc +++ b/NativeLauncher/launcher/lib/core_runtime.cc @@ -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); -- 2.7.4