Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b1858d

Browse files
author
jezal
committed
CryptoC-3: fix for Merkle tree root issue
1 parent 9df3a81 commit 6b1858d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/crypto/tree-hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void tree_hash(const char (*hashes)[HASH_SIZE], size_t count, char *root_hash) {
3232
size_t i, j;
3333
size_t cnt = count - 1;
3434
char (*ints)[HASH_SIZE];
35-
for (i = 1; i < sizeof(size_t); i <<= 1) {
35+
for (i = 1; i < 8 * sizeof(size_t); i <<= 1) {
3636
cnt |= cnt >> i;
3737
}
3838
cnt &= ~(cnt >> 1);

src/version.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#define BUILD_COMMIT_ID "@VERSION@"
22
#define PROJECT_VERSION "1.0.2"
3-
#define PROJECT_VERSION_BUILD_NO "336"
3+
#define PROJECT_VERSION_BUILD_NO "358"
44
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO "(" BUILD_COMMIT_ID ")"

0 commit comments

Comments
 (0)