summaryrefslogtreecommitdiff
path: root/sha3.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha3.c')
-rw-r--r--sha3.c2
1 files changed, 1 insertions, 1 deletions
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;