mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Reject overlong encodings earlier
This commit is contained in:
@@ -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<unsigned char> b256(
|
||||
|
||||
Reference in New Issue
Block a user