Browse Source

channeld: correctly send failure message on local HTLC failure.

valgrind was complaining about uninitialized bytes over the wire.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
committed by Christian Decker
parent
commit
52db7fd27b
  1. 2
      channeld/channel.c

2
channeld/channel.c

@ -1759,6 +1759,8 @@ static void handle_offer_htlc(struct peer *peer, const u8 *inmsg)
abort();
failed:
/* Note: tal_fmt doesn't set tal_len() to exact length, so fix here. */
tal_resize(&failmsg, strlen(failmsg)+1);
msg = towire_channel_offer_htlc_reply(inmsg, 0, failcode, (u8*)failmsg);
daemon_conn_send(&peer->master, take(msg));
}

Loading…
Cancel
Save