]> Git Repo - VerusCoin.git/commitdiff
BUGFIX: Stack around the variable 'rv' was corrupted
authorfsb4000 <[email protected]>
Thu, 12 Mar 2015 14:13:49 +0000 (20:13 +0600)
committerfsb4000 <[email protected]>
Thu, 12 Mar 2015 16:17:22 +0000 (22:17 +0600)
src/uint256.cpp

index 3b1334a032438e57483cbb569f2f1e3c0fa4f831..25148808c67efe4f87c0ce275841c04d47b04dd4 100644 (file)
@@ -45,7 +45,7 @@ void base_blob<BITS>::SetHex(const char* psz)
         psz++;
     psz--;
     unsigned char* p1 = (unsigned char*)data;
-    unsigned char* pend = p1 + WIDTH * 4;
+    unsigned char* pend = p1 + WIDTH;
     while (psz >= pbegin && p1 < pend) {
         *p1 = ::HexDigit(*psz--);
         if (psz >= pbegin) {
@@ -128,7 +128,7 @@ uint64_t uint256::GetHash(const uint256& salt) const
     uint32_t a, b, c;
     const uint32_t *pn = (const uint32_t*)data;
     const uint32_t *salt_pn = (const uint32_t*)salt.data;
-    a = b = c = 0xdeadbeef + (WIDTH << 2);
+    a = b = c = 0xdeadbeef + WIDTH;
 
     a += pn[0] ^ salt_pn[0];
     b += pn[1] ^ salt_pn[1];
This page took 0.036171 seconds and 4 git commands to generate.