Skip to content

Commit

Permalink
blake2xs: fix key length check
Browse files Browse the repository at this point in the history
This does not result in a buffer overflow, because luckily `BLAKE2B_KEYBYTES == BLAKE2S_BLOCKBYTES`.
  • Loading branch information
sneves committed Feb 7, 2023
1 parent 54f4faa commit fb4b09b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ref/blake2xs-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key,
return -1;
}

if (NULL != key && keylen > BLAKE2B_KEYBYTES) {
if (NULL != key && keylen > BLAKE2S_KEYBYTES) {
return -1;
}

Expand Down

0 comments on commit fb4b09b

Please sign in to comment.