Fix edge case around bolt11 invoice parsing
Changelog-None Closes: https://github.com/damus-io/damus/issues/3190 Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -162,7 +162,7 @@ bech32_encoding bech32_decode(char* hrp, uint8_t *data, size_t *data_len, const
|
||||
if (len > max_input_len) {
|
||||
return BECH32_ENCODING_NONE;
|
||||
}
|
||||
static const int MAX_PREFIX = 9; // 8 bytes for the text, 1 byte for the null terminator
|
||||
static const int MAX_PREFIX = 10; // 9 bytes for the text, 1 byte for the null terminator
|
||||
return bech32_decode_len(hrp, data, data_len, input, len, MAX_PREFIX);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user