SWDEV-332604 - Add nullptr check for argument pitch
Change-Id: I6d7aa5356a74b92f21f7a51a7d3e2f8d0b920e07
[ROCm/clr commit: 2613ebf157]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user