SWDEV-332604 - Add nullptr check for argument pitch

Change-Id: I6d7aa5356a74b92f21f7a51a7d3e2f8d0b920e07


[ROCm/clr commit: 2613ebf157]
This commit is contained in:
Rakesh Roy
2022-04-21 21:05:12 +05:30
committed by Rakesh Roy
parent 1c5b11fd04
commit 7a572e0162
+1 -1
View File
@@ -653,7 +653,7 @@ hipError_t ihipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t heigh
amd::Device* device = hip::getCurrentDevice()->devices()[0];
if (ptr == nullptr) {
if ((ptr == nullptr) || (pitch == nullptr)) {
return hipErrorInvalidValue;
}