diff --git a/src/ripple/protocol/impl/tokens.cpp b/src/ripple/protocol/impl/tokens.cpp index 9fb6d79357..c1d0e8f85b 100644 --- a/src/ripple/protocol/impl/tokens.cpp +++ b/src/ripple/protocol/impl/tokens.cpp @@ -216,6 +216,10 @@ decodeBase58 (std::string const& s, ++psz; --remain; } + + if (remain > 64) + return {}; + // Allocate enough space in big-endian base256 representation. // log(58) / log(256), rounded up. std::vector b256(