Fix length calculation of fallback key json

sas-base64-fix
Tobias Furuholm 2020-11-24 06:40:28 +01:00 committed by Hubert Chathi
parent b9771dae61
commit 541a2bf6fd
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ std::size_t olm::Account::generate_fallback_key(
std::size_t olm::Account::get_fallback_key_json_length(
) {
std::size_t length = 4 + sizeof(KEY_JSON_CURVE25519); /* {"curve25519":{}} */
std::size_t length = 4 + sizeof(KEY_JSON_CURVE25519) - 1; /* {"curve25519":{}} */
OneTimeKey & key = current_fallback_key;
if (key.published) {
length += 1; /* " */