From e76c8b47fb4e813fc4d3b11c3e35ef12a69f794b Mon Sep 17 00:00:00 2001 From: "Edgar E. Iglesias" Date: Sat, 6 Apr 2013 11:30:10 +0200 Subject: Fix condition for when the block buffer is full. --- sha3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sha3.c') diff --git a/sha3.c b/sha3.c index d7aec46e..21e7beb7 100644 --- a/sha3.c +++ b/sha3.c @@ -61,7 +61,7 @@ _sha3_update (struct sha3_state *state, if (pos > 0) { unsigned left = block_size - pos; - if (length < pos) + if (length < left) { memcpy (block + pos, data, length); return pos + length; -- cgit v1.2.1