From fbfbbdd349f2b8ce9eb39ae94759b833bc603635 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 16 Sep 2014 20:09:33 -0700 Subject: [PATCH] Ensure that nothing explodes when calling crypto_generichash_blake2b_init_salt_personal with salt/personal == NULL --- test/default/generichash3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/default/generichash3.c b/test/default/generichash3.c index 3ea55dde..2e8635c0 100644 --- a/test/default/generichash3.c +++ b/test/default/generichash3.c @@ -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; }