From bdfda5dc83629e6cc80f32ff9735f2e49e0293f0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 2 Jan 2019 16:14:15 +0100 Subject: [PATCH] Nits --- test/default/kdf.c | 2 +- test/default/sign.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/default/kdf.c b/test/default/kdf.c index 0c9c7122..f10f034e 100644 --- a/test/default/kdf.c +++ b/test/default/kdf.c @@ -15,7 +15,7 @@ tv_kdf(void) context = (char *) sodium_malloc(crypto_kdf_CONTEXTBYTES); master_key = (unsigned char *) sodium_malloc(crypto_kdf_KEYBYTES); - memcpy(context, "KDF test", strlen("KDF test")); + memcpy(context, "KDF test", sizeof "KDF test" -1U); for (i = 0; i < crypto_kdf_KEYBYTES; i++) { master_key[i] = i; } diff --git a/test/default/sign.c b/test/default/sign.c index 7f25f531..30a2882b 100644 --- a/test/default/sign.c +++ b/test/default/sign.c @@ -1259,7 +1259,7 @@ int main(void) } sodium_hex2bin(sk, crypto_sign_SECRETKEYBYTES, "833fe62409237b9d62ec77587520911e9a759cec1d19755b7da901b96dca3d42", - 2 * crypto_sign_SECRETKEYBYTES , NULL, NULL, NULL); + 2 * crypto_sign_SECRETKEYBYTES / 2, NULL, NULL, NULL); sodium_hex2bin(pk, crypto_sign_PUBLICKEYBYTES, "ec172b93ad5e563bf4932c70e1245034c35467ef2efd4d64ebf819683467e2bf", 2 * crypto_sign_PUBLICKEYBYTES, NULL, NULL, NULL);