Skip to content

Commit

Permalink
Thanks to MacOS for having stack smashing detection!
Browse files Browse the repository at this point in the history
Reported-by: @larsschenk
Reported-by: @nickfarrow
Fixes: #4728
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Sep 1, 2021
1 parent 1705076 commit 08913ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/initial_commit_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
enum side lessor = !opener;
u32 sequence;
void *dummy_local = (void *)LOCAL, *dummy_remote = (void *)REMOTE;
const void *output_order[NUM_SIDES];
/* There is a direct, and possibly an anchor output for each side. */
const void *output_order[2 * NUM_SIDES];
const u8 *funding_wscript = bitcoin_redeem_2of2(tmpctx,
&funding_key[LOCAL],
&funding_key[REMOTE]);
Expand Down Expand Up @@ -286,6 +287,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
}

assert(n <= tx->wtx->num_outputs);
assert(n <= ARRAY_SIZE(output_order));

/* BOLT #3:
*
Expand Down

0 comments on commit 08913ed

Please sign in to comment.