From bf1d876166e86fd9116c8c4c2c5f76e2afb2030e Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Mon, 25 Nov 2019 23:29:39 +0100 Subject: [PATCH] Fixed buffer length in test. The buffers tested for equality were too short. Now we test the whole of them. Note: this may not be the only instance of this error. --- tests/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test.c b/tests/test.c index 5d173c2..3e40d9d 100644 --- a/tests/test.c +++ b/tests/test.c @@ -257,7 +257,7 @@ static int p_chacha20_same_ptr() RANDOM_INPUT(nonce, 8); crypto_chacha20(output, input, INPUT_SIZE, key, nonce); crypto_chacha20(input , input, INPUT_SIZE, key, nonce); - status |= memcmp(output, input, CHACHA_BLOCK_SIZE); + status |= memcmp(output, input, INPUT_SIZE); printf("%s: Chacha20 (output == input)\n", status != 0 ? "FAILED" : "OK"); return status; } -- 2.47.3