SWDEV-337119 - Validate width isn't exceeding either dpitch or spitch in
ihipMemcpy2D Change-Id: I8ac68e033762616a42585b26f0b3aa5bbb29ce9c
Bu işleme şunda yer alıyor:
@@ -2031,12 +2031,12 @@ hipError_t ihipMemcpyParam2D(const hip_Memcpy2D* pCopy,
|
||||
hipError_t ihipMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width,
|
||||
size_t height, hipMemcpyKind kind, hipStream_t stream, bool isAsync = false) {
|
||||
hip_Memcpy2D desc = {};
|
||||
if (spitch == 0 || dpitch == 0) {
|
||||
return hipErrorUnknown;
|
||||
}
|
||||
if (width == 0 || height == 0) {
|
||||
if ((width == 0) || (height == 0)) {
|
||||
return hipSuccess;
|
||||
}
|
||||
if ((width > dpitch) || (width > spitch)) {
|
||||
return hipErrorInvalidPitchValue;
|
||||
}
|
||||
|
||||
desc.srcXInBytes = 0;
|
||||
desc.srcY = 0;
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle