mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
common: fix bolt11 parsing of unknown f
versions.
As tested in next test. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
d8e933aac7
commit
77c867d95f
@ -390,9 +390,14 @@ static char *decode_f(struct bolt11 *b11,
|
||||
fallback = scriptpubkey_witness_raw(b11, version,
|
||||
f, tal_count(f));
|
||||
tal_free(f);
|
||||
} else
|
||||
} else {
|
||||
/* Restore version for unknown field! */
|
||||
(*data)--;
|
||||
(*data_len)++;
|
||||
data_length++;
|
||||
return unknown_field(b11, hu5, data, data_len, 'f',
|
||||
data_length);
|
||||
}
|
||||
|
||||
if (b11->fallbacks == NULL)
|
||||
b11->fallbacks = tal_arr(b11, const u8 *, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user