From 8a4610c315a6c9be69c6076e27d912a88fa433c2 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 22 Dec 2017 12:08:02 +0000 Subject: blake256: fix wrong hash when computed in parts This does not happen when used by the monero code --- src/crypto/blake256.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]++; -- cgit v1.2.3