From f69306006853f02cf3ea689ee012fefddba1ed6e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 6 Oct 2015 12:00:12 +1030 Subject: [PATCH] test_onion: fix random padding. Randomness is now at start; thanks valgrind! Signed-off-by: Rusty Russell --- test/test_onion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_onion.c b/test/test_onion.c index 0fd9e6845..a655e6aa6 100644 --- a/test/test_onion.c +++ b/test/test_onion.c @@ -498,7 +498,7 @@ bool create_onion(const secp256k1_pubkey pubkey[], /* Unused hops filled with random, so even recipient can't tell * how many were used. */ junk_hops = MAX_HOPS - num; - random_bytes(onion->hop + num, junk_hops * sizeof(struct hop)); + random_bytes(onion->hop, junk_hops * sizeof(struct hop)); for (i = num - 1; i >= 0; i--) { size_t other_hops, len;