From c586965e3695547fbe22e55e66693572bc53d189 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 11 Mar 2022 20:49:33 +0000 Subject: [PATCH] SWDEV-327299 - strncpy to memcpy to avoid overflow warning Change-Id: I0bb5aed76e74b4580bae71b6cb1ef2c17293a126 [ROCm/clr commit: ba6d6b377d5fd4a29ae81b3ddae6fcf48d923fdf] --- projects/clr/hipamd/src/hip_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_device.cpp b/projects/clr/hipamd/src/hip_device.cpp index 01ac9a750a..f4eab0686f 100644 --- a/projects/clr/hipamd/src/hip_device.cpp +++ b/projects/clr/hipamd/src/hip_device.cpp @@ -144,7 +144,7 @@ hipError_t hipDeviceGetName(char *name, int len, hipDevice_t device) { HIP_RETURN(hipErrorInvalidValue); } - ::strncpy(name, info.boardName_, (nameLen + 1)); + ::memcpy(name, info.boardName_, (nameLen + 1)); HIP_RETURN(hipSuccess); }