Browse Source

common: fix bolt11 parsing of unknown `f` versions.

As tested in next test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
committed by Christian Decker
parent
commit
77c867d95f
  1. 7
      common/bolt11.c

7
common/bolt11.c

@ -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…
Cancel
Save