Fix hipMemSetAsync compilation, bounds check on name copy

This commit is contained in:
Ben Sander
2016-10-03 19:05:19 -05:00
parent 9f05eca0a0
commit 88fb0efa6d
+2 -2
View File
@@ -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;