SWDEV-430619 - copy uuid via memcpy

If uuid is copied via strncpy it will stop at first null character. We
  need to copy all 16 bytes which might have a null on windows.

Change-Id: I8667919cb251133eec3333a23768c356879727e8


[ROCm/clr commit: db909b2a1e]
This commit is contained in:
Jatin Chaudhary
2023-12-12 00:06:38 +00:00
zatwierdzone przez Jatin Jaikishan Chaudhary
rodzic 5aaa498e45
commit bb93a976d4
+1 -1
Wyświetl plik
@@ -291,7 +291,7 @@ hipError_t ihipGetDeviceProperties(hipDeviceProp_tR0600* props, int device) {
const auto& info = deviceHandle->info();
const auto& isa = deviceHandle->isa();
::strncpy(deviceProps.name, info.boardName_, sizeof(info.boardName_));
::strncpy(deviceProps.uuid.bytes, info.uuid_, sizeof(info.uuid_));
memcpy(deviceProps.uuid.bytes, info.uuid_, sizeof(info.uuid_));
deviceProps.totalGlobalMem = info.globalMemSize_;
deviceProps.sharedMemPerBlock = info.localMemSizePerCU_;
deviceProps.sharedMemPerMultiprocessor = info.localMemSizePerCU_ * info.numRTCUs_;