diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-22 12:08:02 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-22 12:08:02 +0000 |
commit | 8a4610c315a6c9be69c6076e27d912a88fa433c2 (patch) | |
tree | 3b78335d51f33a87733b2176fe78b26fbefa73b7 | |
parent | Merge pull request #2961 (diff) | |
download | monero-8a4610c315a6c9be69c6076e27d912a88fa433c2.tar.xz |
blake256: fix wrong hash when computed in parts
This does not happen when used by the monero code
-rw-r--r-- | src/crypto/blake256.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/blake256.c b/src/crypto/blake256.c index 1e43f9c4d..95b2a6927 100644 --- a/src/crypto/blake256.c +++ b/src/crypto/blake256.c @@ -157,7 +157,7 @@ void blake256_update(state *S, const uint8_t *data, uint64_t datalen) { int left = S->buflen >> 3; int fill = 64 - left; - if (left && (((datalen >> 3) & 0x3F) >= (unsigned) fill)) { + if (left && (((datalen >> 3)) >= (unsigned) fill)) { memcpy((void *) (S->buf + left), (void *) data, fill); S->t[0] += 512; if (S->t[0] == 0) S->t[1]++; |