c
#include <limits.h>

if ((nXDst > 0 && dstBytesPerPixel > UINT32_MAX / nXDst) ||
    (nYDst > 0 && nDstStep > UINT32_MAX / nYDst) ||
    (nXDst * dstBytesPerPixel > UINT32_MAX - nYDst * nDstStep)) {
    // Handle overflow error
    return FALSE;
}
const BYTE* pDstStart = &pDstData[nXDst * dstBytesPerPixel + nYDst * nDstStep];
