Skip to content

Commit

Permalink
change char limit to 1023 for bech32 decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
josibake committed Sep 8, 2023
1 parent ccf8139 commit ca33773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bech32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ std::string Encode(Encoding encoding, const std::string& hrp, const data& values
}

/** Decode a Bech32 or Bech32m string. */
DecodeResult Decode(const std::string& str, bool silent) {
std::size_t max_size = silent ? 1024 : 90;
DecodeResult Decode(const std::string& str, bool silent_payment) {
std::size_t max_size = silent_payment ? 1023 : 90;

std::vector<int> errors;
if (!CheckCharacters(str, errors)) return {};
Expand Down

0 comments on commit ca33773

Please sign in to comment.