Fixing issues found by coverity
What does this MR do and why?
CID 1539820b: Incorrect sizeof expression
bad_sizeof: Taking the size of arithmetic expression properties->pCopySrcLayouts[0] * pdevice->properties.copySrcLayoutCount is suspicious.
CID 1541135: Division or modulo by zero
divide_by_zero: In expression (size + stride - 1U) / stride division by expression stride which may be zero has undefined behavior.