mirror of
https://github.com/BLAKE2/BLAKE2
synced 2024-11-23 02:42:10 +01:00
blake2xs: fix key length check
This does not result in a buffer overflow, because luckily `BLAKE2B_KEYBYTES == BLAKE2S_BLOCKBYTES`.
This commit is contained in:
parent
54f4faa4c1
commit
fb4b09b495
@ -33,7 +33,7 @@ int blake2xs_init_key( blake2xs_state *S, const size_t outlen, const void *key,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != key && keylen > BLAKE2B_KEYBYTES) {
|
if (NULL != key && keylen > BLAKE2S_KEYBYTES) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user