Fix blake2 final coverity issue

This commit is contained in:
Eric Blankenhorn
2025-07-14 14:53:37 -05:00
parent bbc5dc528b
commit efdca85aec

View File

@@ -356,7 +356,7 @@ int blake2b_final( blake2b_state *S, byte *out, byte outlen )
}
S->buflen -= BLAKE2B_BLOCKBYTES;
if ( S->buflen >= (BLAKE2B_BLOCKBYTES * 2) )
if ( S->buflen > BLAKE2B_BLOCKBYTES )
return BAD_LENGTH_E;
XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, (wolfssl_word)S->buflen );
}