From ca9a38d1047f72c2e95611cedff5e23e8a080f31 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 17 Jun 2018 19:06:12 +0200 Subject: [PATCH] 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). --- tests/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.3