diff --git a/src/beast/include/beast/core/detail/base64.hpp b/src/beast/include/beast/core/detail/base64.hpp index 31b426a61e..9d29ca78b8 100644 --- a/src/beast/include/beast/core/detail/base64.hpp +++ b/src/beast/include/beast/core/detail/base64.hpp @@ -96,8 +96,7 @@ inline std::size_t constexpr decoded_size(std::size_t n) { - return n / 4 * 3; // requires n&3==0, smaller - //return 3 * n / 4; + return ((n / 4) * 3) + 2; } /** Encode a series of octets as a padded, base64 string.