Skip to content

Commit

Permalink
Merge pull request #5884
Browse files Browse the repository at this point in the history
e96c518 BUGFIX: Stack around the variable 'rv' was corrupted (fsb4000)
  • Loading branch information
laanwj committed Mar 12, 2015
2 parents 84a7789 + e96c518 commit 7077fe6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uint256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 7077fe6

Please sign in to comment.