mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-26 19:57:13 +09:00
memzero() the state if we call generichash_final() twice
This commit is contained in:
@@ -359,6 +359,7 @@ blake2b_final(blake2b_state *S, uint8_t *out, uint8_t outlen)
|
||||
sodium_misuse("blake2b_final(): unsupported output length");
|
||||
}
|
||||
if (blake2b_is_lastblock(S)) {
|
||||
sodium_memzero(S, sizeof *S);
|
||||
return -1;
|
||||
}
|
||||
if (S->buflen > BLAKE2B_BLOCKBYTES) {
|
||||
|
||||
Reference in New Issue
Block a user