Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
541a2bf6
Commit
541a2bf6
authored
Nov 24, 2020
by
Tobias Furuholm
Committed by
Hubert Chathi
Nov 24, 2020
Browse files
Fix length calculation of fallback key json
parent
b9771dae
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/account.cpp
View file @
541a2bf6
...
@@ -316,7 +316,7 @@ std::size_t olm::Account::generate_fallback_key(
...
@@ -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
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
;
OneTimeKey
&
key
=
current_fallback_key
;
if
(
key
.
published
)
{
if
(
key
.
published
)
{
length
+=
1
;
/* " */
length
+=
1
;
/* " */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment