c++
static INLINE BOOL overlapping(const BYTE* pDstData, UINT32 nXDst, UINT32 nYDst, UINT32 nDstStep,
                               UINT32 dstBytesPerPixel, const BYTE* pSrcData, UINT32 nXSrc,
                               UINT32 nYSrc, UINT32 nSrcStep, UINT32 srcBytesPerPixel,
                               UINT32 nWidth, UINT32 nHeight)
{
    if (nXDst > SIZE_MAX / dstBytesPerPixel ||
        nYDst > SIZE_MAX / nDstStep ||
        nXDst * dstBytesPerPixel > SIZE_MAX - nYDst * nDstStep)
        return FALSE; // Indicate an error

    const BYTE* pDstStart = &pDstData[nXDst * dstBytesPerPixel + nYDst * nDstStep];
    // ... rest of the function
}
