Skip to content
Snippets Groups Projects
Commit b91c9517 authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Fix crash by suppling the correct input size for base64 encoding

parent b63e156c
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ mtx::client::crypto::encode_base64(const uint8_t *data, std::size_t len)
throw std::runtime_error("invalid base64 input length");
auto output_buf = create_buffer(output_nbytes);
olm::encode_base64(data, output_nbytes, output_buf.get());
olm::encode_base64(data, len, output_buf.get());
return std::string(output_buf.get(), output_buf.get() + output_nbytes);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment