Skip to content

Commit 7077fe6

Browse files
committed
Merge pull request #5884
e96c518 BUGFIX: Stack around the variable 'rv' was corrupted (fsb4000)
2 parents 84a7789 + e96c518 commit 7077fe6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uint256.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void base_blob<BITS>::SetHex(const char* psz)
4545
psz++;
4646
psz--;
4747
unsigned char* p1 = (unsigned char*)data;
48-
unsigned char* pend = p1 + WIDTH * 4;
48+
unsigned char* pend = p1 + WIDTH;
4949
while (psz >= pbegin && p1 < pend) {
5050
*p1 = ::HexDigit(*psz--);
5151
if (psz >= pbegin) {
@@ -128,7 +128,7 @@ uint64_t uint256::GetHash(const uint256& salt) const
128128
uint32_t a, b, c;
129129
const uint32_t *pn = (const uint32_t*)data;
130130
const uint32_t *salt_pn = (const uint32_t*)salt.data;
131-
a = b = c = 0xdeadbeef + (WIDTH << 2);
131+
a = b = c = 0xdeadbeef + WIDTH;
132132

133133
a += pn[0] ^ salt_pn[0];
134134
b += pn[1] ^ salt_pn[1];

0 commit comments

Comments
 (0)