mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
pay: fix crash on invalid onion in reply in some cases.
fail can be NULL here. Reported-by: https://github.com/shafemtol Fixes: #5053 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
5c20b8b1a3
commit
7abc491f4c
1 changed files with 1 additions and 1 deletions
|
@ -212,7 +212,7 @@ void json_sendpay_fail_fields(struct json_stream *js,
|
|||
json_add_payment_fields(js, payment);
|
||||
if (pay_errcode == PAY_UNPARSEABLE_ONION && onionreply)
|
||||
json_add_hex_talarr(js, "onionreply", onionreply->contents);
|
||||
else
|
||||
else if (fail)
|
||||
json_add_routefail_info(js,
|
||||
fail->erring_index,
|
||||
fail->failcode,
|
||||
|
|
Loading…
Add table
Reference in a new issue