From ca3377304730e2d4b1b335463716ce9d95385a50 Mon Sep 17 00:00:00 2001 From: josibake Date: Thu, 3 Aug 2023 12:45:34 +0200 Subject: [PATCH] change char limit to 1023 for bech32 decoding --- src/bech32.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bech32.cpp b/src/bech32.cpp index 40bccff1724fea..409fdf1e3cc6c7 100644 --- a/src/bech32.cpp +++ b/src/bech32.cpp @@ -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 errors; if (!CheckCharacters(str, errors)) return {};