c
if (nXDst > (SIZE_MAX / dstBytesPerPixel) ||
    nYDst > (SIZE_MAX / nDstStep) ||
    (nXDst * dstBytesPerPixel) > (SIZE_MAX - (nYDst * nDstStep))) {
    // Handle overflow error
    return NULL;
}

const BYTE* pDstStart = &pDstData[nXDst * dstBytesPerPixel + nYDst * nDstStep];
