Fix memcmp.

This commit is contained in:
JoelKatz
2012-04-29 23:17:46 -07:00
parent c0231e2f15
commit 1c3dff42c7

View File

@@ -727,7 +727,7 @@ void Peer::getSessionCookie(std::string& strDst)
SHA512(s1, l1, sha1);
SHA512(s2, l2, sha2);
if (memcmp(s1, s2, sizeof(sha1))
if (memcmp(s1, s2, sizeof(sha1)) == 0)
throw std::runtime_errror("Identical finished messages");
for (int i = 0; i < sizeof(sha1); ++i)