diff --git a/hipamd/include/nvcc_detail/hip_runtime_api.h b/hipamd/include/nvcc_detail/hip_runtime_api.h index b5dee3898f..4088064f87 100644 --- a/hipamd/include/nvcc_detail/hip_runtime_api.h +++ b/hipamd/include/nvcc_detail/hip_runtime_api.h @@ -329,7 +329,7 @@ inline static hipError_t hipMemset(void* devPtr,int value, size_t count) { return hipCUDAErrorTohipError(cudaMemset(devPtr, value, count)); } -inline static hipError_t hipMemsetAsync(void* devPtr,int value, size_t count, hipStream stream = 0) { +inline static hipError_t hipMemsetAsync(void* devPtr,int value, size_t count, hipStream_t stream = 0) { return hipCUDAErrorTohipError(cudaMemsetAsync(devPtr, value, count, stream)); } @@ -338,7 +338,7 @@ inline static hipError_t hipGetDeviceProperties(hipDeviceProp_t *p_prop, int dev cudaDeviceProp cdprop; cudaError_t cerror; cerror = cudaGetDeviceProperties(&cdprop,device); - strcpy(p_prop->name,cdprop.name); + strncpy(p_prop->name,cdprop.name, 256); p_prop->totalGlobalMem = cdprop.totalGlobalMem ; p_prop->sharedMemPerBlock = cdprop.sharedMemPerBlock; p_prop->regsPerBlock = cdprop.regsPerBlock;