Commit 04be7d44 authored by jselbie's avatar jselbie

Fixed compiling warnings around ASSERTs doing pointer math

parent b348619e
...@@ -568,7 +568,7 @@ HRESULT CStunMessageBuilder::AddMessageIntegrityLongTerm(const char* pszUserName ...@@ -568,7 +568,7 @@ HRESULT CStunMessageBuilder::AddMessageIntegrityLongTerm(const char* pszUserName
pDst += lenPassword; pDst += lenPassword;
*pDst ='\0'; // null terminate for debugging (this char doesn not get hashed *pDst ='\0'; // null terminate for debugging (this char doesn not get hashed
ASSERT((pDst-key) == lenTotal); ASSERT(key+lenTotal == pDst);
#ifndef __APPLE__ #ifndef __APPLE__
pResult = MD5(key, lenTotal, hash); pResult = MD5(key, lenTotal, hash);
......
...@@ -342,7 +342,7 @@ HRESULT CStunMessageReader::ValidateMessageIntegrityLong(const char* pszUser, co ...@@ -342,7 +342,7 @@ HRESULT CStunMessageReader::ValidateMessageIntegrityLong(const char* pszUser, co
} }
*pDst = '0'; // null terminate for debugging (does not get hashed) *pDst = '0'; // null terminate for debugging (does not get hashed)
ASSERT((pDst-key) == totallength); ASSERT(key+totallength == pDst);
#ifndef __APPLE__ #ifndef __APPLE__
ChkIfA(NULL == MD5(key, totallength, hash), E_FAIL); ChkIfA(NULL == MD5(key, totallength, hash), E_FAIL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment