From: Loup Vaillant Date: Mon, 25 Nov 2019 22:29:39 +0000 (+0100) Subject: Fixed buffer length in test. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=bf1d876166e86fd9116c8c4c2c5f76e2afb2030e;p=Monocypher.git 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. --- 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; }