diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-03-12 18:02:35 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-03-12 18:16:24 +0100 |
commit | 7077fe6dd4208bdbd46940f7923b7d89202c3287 (patch) | |
tree | 9df5b2d8ea4a0f5b5fa715e578bbf8b511bc79a8 | |
parent | 84a7789b291ee7c72cf02f777f3011243f384d95 (diff) | |
parent | e96c5184e783cf940956bf803dae8690dcf2b496 (diff) |
Merge pull request #5884
e96c518 BUGFIX: Stack around the variable 'rv' was corrupted (fsb4000)
-rw-r--r-- | src/uint256.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uint256.cpp b/src/uint256.cpp index 3b1334a032..25148808c6 100644 --- a/src/uint256.cpp +++ b/src/uint256.cpp @@ -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]; |