mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
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>
This commit is contained in:
committed by
Christian Decker
parent
9da5abc39c
commit
52db7fd27b
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user