mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-26 19:57:13 +09:00
Ensure that nothing explodes when calling crypto_generichash_blake2b_init_salt_personal with salt/personal == NULL
This commit is contained in:
@@ -144,5 +144,10 @@ int main(void)
|
||||
assert(crypto_generichash_blake2b_salt_personal(out, sizeof out, in, MAXLEN,
|
||||
k, crypto_generichash_KEYBYTES_MAX + 1U,
|
||||
salt, personal) == -1);
|
||||
assert(crypto_generichash_blake2b_init_salt_personal(&st, k, sizeof k, crypto_generichash_BYTES,
|
||||
NULL, personal) == 0);
|
||||
assert(crypto_generichash_blake2b_init_salt_personal(&st, k, sizeof k, crypto_generichash_BYTES,
|
||||
personal, NULL) == 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user