summaryrefslogtreecommitdiff
path: root/src/test/test_shared_random.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-05 12:14:04 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-05 12:14:04 -0400
commit87758dbebc7ab624ba7b8802478ae2dc980d90c0 (patch)
treef4e13772fa5c5ece2056827451d2a9d775acdc56 /src/test/test_shared_random.c
parente889da1d7f34632dce24ab590b1df99d11b5c91c (diff)
parentcc34929abc3a5423372d1e12d47710ed366d43b4 (diff)
downloadtor-87758dbebc7ab624ba7b8802478ae2dc980d90c0.tar.gz
tor-87758dbebc7ab624ba7b8802478ae2dc980d90c0.zip
Merge remote-tracking branch 'dgoulet/bug19567_029_01'
Diffstat (limited to 'src/test/test_shared_random.c')
-rw-r--r--src/test/test_shared_random.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 48aa404e85..886cee3a33 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -944,13 +944,14 @@ test_utils(void *arg)
/* Testing commitments_are_the_same(). Currently, the check is to test the
* value of the encoded commit so let's make sure that actually works. */
{
- /* Payload of 55 bytes that is the length of
- * sr_commit_t->encoded_commit. */
+ /* Payload of 57 bytes that is the length of sr_commit_t->encoded_commit.
+ * 56 bytes of payload and a NUL terminated byte at the end ('\x00')
+ * which comes down to SR_COMMIT_BASE64_LEN + 1. */
const char *payload =
"\x5d\xb9\x60\xb6\xcc\x51\x68\x52\x31\xd9\x88\x88\x71\x71\xe0\x30"
"\x59\x55\x7f\xcd\x61\xc0\x4b\x05\xb8\xcd\xc1\x48\xe9\xcd\x16\x1f"
"\x70\x15\x0c\xfc\xd3\x1a\x75\xd0\x93\x6c\xc4\xe0\x5c\xbe\xe2\x18"
- "\xc7\xaf\x72\xb6\x7c\x9b\x52";
+ "\xc7\xaf\x72\xb6\x7c\x9b\x52\x00";
sr_commit_t commit1, commit2;
memcpy(commit1.encoded_commit, payload, sizeof(commit1.encoded_commit));
memcpy(commit2.encoded_commit, payload, sizeof(commit2.encoded_commit));