From: Loup Vaillant Date: Sun, 17 Jun 2018 17:06:12 +0000 (+0200) Subject: Corrected variable sized buffer in the tests. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=ca9a38d1047f72c2e95611cedff5e23e8a080f31;p=Monocypher.git Corrected variable sized buffer in the tests. The p_eddsa_random() test was triggering the TIS interbreter because of a variable sized array allocated on the stack. The test run properly with a fixed sized buffer. (Variable size buffers are tested elsewhere, most notably with the test vectors). --- diff --git a/tests/test.c b/tests/test.c index fdee2bb..9397ea1 100644 --- a/tests/test.c +++ b/tests/test.c @@ -592,10 +592,10 @@ static int p_eddsa_random() { int status = 0; FOR (i, 0, 100) { - RANDOM_INPUT(message, i); + RANDOM_INPUT(message, MESSAGE_SIZE); RANDOM_INPUT(pk, 32); RANDOM_INPUT(signature , 64); - status |= ~crypto_check(signature, pk, message, i); + status |= ~crypto_check(signature, pk, message, MESSAGE_SIZE); } printf("%s: EdDSA (random)\n", status != 0 ? "FAILED" : "OK"); return status;