Skip to content

Commit efdca85

Browse files
committed
Fix blake2 final coverity issue
1 parent bbc5dc5 commit efdca85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wolfcrypt/src/blake2b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ int blake2b_final( blake2b_state *S, byte *out, byte outlen )
356356
}
357357

358358
S->buflen -= BLAKE2B_BLOCKBYTES;
359-
if ( S->buflen >= (BLAKE2B_BLOCKBYTES * 2) )
359+
if ( S->buflen > BLAKE2B_BLOCKBYTES )
360360
return BAD_LENGTH_E;
361361
XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, (wolfssl_word)S->buflen );
362362
}

0 commit comments

Comments
 (0)