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:
zatwierdzone przez
Jatin Jaikishan Chaudhary
rodzic
5aaa498e45
commit
bb93a976d4
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user