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
a5efc08e
Commit
a5efc08e
authored
May 11, 2021
by
Denis Kasak
Browse files
olm: Also initialize all fields when decoding Olm messages.
As a precaution.
parent
c325db02
Pipeline
#4669
passed with stages
in 2 minutes and 32 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/message.cpp
View file @
a5efc08e
...
...
@@ -206,9 +206,11 @@ void olm::decode_message(
std
::
uint8_t
const
*
end
=
input
+
input_length
-
mac_length
;
std
::
uint8_t
const
*
unknown
=
nullptr
;
reader
.
version
=
0
;
reader
.
has_counter
=
false
;
reader
.
counter
=
0
;
reader
.
input
=
input
;
reader
.
input_length
=
input_length
;
reader
.
has_counter
=
false
;
reader
.
ratchet_key
=
nullptr
;
reader
.
ratchet_key_length
=
0
;
reader
.
ciphertext
=
nullptr
;
...
...
@@ -291,6 +293,7 @@ void olm::decode_one_time_key_message(
std
::
uint8_t
const
*
end
=
input
+
input_length
;
std
::
uint8_t
const
*
unknown
=
nullptr
;
reader
.
version
=
0
;
reader
.
one_time_key
=
nullptr
;
reader
.
one_time_key_length
=
0
;
reader
.
identity_key
=
nullptr
;
...
...
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