Commit 26d8ed95 authored by Niels Möller's avatar Niels Möller

siv-test: Fix out-of-bounds read.

parent 35a58537
2019-09-30 Niels Möller <nisse@lysator.liu.se>
* testsuite/siv-test.c (test_cipher_siv): Fix out-of-bounds read.
2019-09-15 Niels Möller <nisse@lysator.liu.se>
From Dmitry Eremin-Solenikov:
......
......@@ -155,7 +155,7 @@ test_cipher_siv(const char *name,
en_data[0] ^= 1;
ret = siv_decrypt(ctx, nonce->length, nonce->data,
authdata->length, authdata->data,
ciphertext->length, de_data, en_data);
cleartext->length, de_data, en_data);
if (ret != 0) fprintf(stderr, "siv_decrypt_message failed to detect corrupted message\n");
/* Ensure we can detect corrupted adata. */
......@@ -163,7 +163,7 @@ test_cipher_siv(const char *name,
en_data[0] ^= 1;
ret = siv_decrypt(ctx, nonce->length, nonce->data,
authdata->length-1, authdata->data,
ciphertext->length, de_data, en_data);
cleartext->length, de_data, en_data);
if (ret != 0) fprintf(stderr, "siv_decrypt_message failed to detect corrupted message\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment