diff --git a/AK/Base64.cpp b/AK/Base64.cpp index 5df2eebac99..906a608569a 100644 --- a/AK/Base64.cpp +++ b/AK/Base64.cpp @@ -96,7 +96,7 @@ ByteBuffer decode_base64(const StringView& input) String encode_base64(ReadonlyBytes input) { constexpr auto alphabet = make_alphabet(); - StringBuilder output(calculate_base64_decoded_length(input)); + StringBuilder output(calculate_base64_encoded_length(input)); auto get = [&](const size_t offset, bool* need_padding = nullptr) -> u8 { if (offset >= input.size()) {