aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-22 12:08:02 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-22 12:08:02 +0000
commit8a4610c315a6c9be69c6076e27d912a88fa433c2 (patch)
tree3b78335d51f33a87733b2176fe78b26fbefa73b7 /src
parentMerge pull request #2961 (diff)
downloadmonero-8a4610c315a6c9be69c6076e27d912a88fa433c2.tar.xz
blake256: fix wrong hash when computed in parts
This does not happen when used by the monero code
Diffstat (limited to 'src')
-rw-r--r--src/crypto/blake256.c2
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]++;