message: Sanity check for max string to encode
  Thanks to for validating and supplying the numbers.
diff: namespace
  {
  +// You have at most 512 bits to encode + 40 bits checksum + 8 bits version field for a 560 bit payload.
  +// You can encode 5 bits per character, so that's 560 / 5 = 112.
  +static uint32_t MAX_CASHADDR_SIZE = 112;
  +
  typedef std::vector<uint8_t> data;
  /**
  @@ -233,6 +237,10 @@ std::string Encode(const std::string &prefix, const data &values)
  */
  std::pair<std::string, data> Decode(const std::string &str, const std::string &default_prefix)
  {
  + // Is within size constraints.
  + if (str.size() > (MAX_CASHADDR_SIZE + default_prefix.size() + 1))
  + return {};
  +
  // Go over the string and do some sanity checks.
  bool lower = false, upper = false, hasNumber = false;
  size_t prefixSize = 0;
  