Make sure there is enough buffer space in binary_buffer_to_base64_string()