Skip to content

Commit f05a97a

Browse files
committed
Stack around the variable 'rv' was corrupted.
Coming from upstream@e96c5184e783cf940956bf803dae8690dcf2b496
1 parent 2371666 commit f05a97a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/blob_uint256.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2009-2010 Satoshi Nakamoto
22
// Copyright (c) 2009-2014 The Bitcoin Core developers
33
// Distributed under the MIT software license, see the accompanying
4-
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
55

66
#include "blob_uint256.h"
77

@@ -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 blob_uint256::GetHash(const blob_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)