Commit a5efc08e authored by Denis Kasak's avatar 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
...@@ -206,9 +206,11 @@ void olm::decode_message( ...@@ -206,9 +206,11 @@ void olm::decode_message(
std::uint8_t const * end = input + input_length - mac_length; std::uint8_t const * end = input + input_length - mac_length;
std::uint8_t const * unknown = nullptr; std::uint8_t const * unknown = nullptr;
reader.version = 0;
reader.has_counter = false;
reader.counter = 0;
reader.input = input; reader.input = input;
reader.input_length = input_length; reader.input_length = input_length;
reader.has_counter = false;
reader.ratchet_key = nullptr; reader.ratchet_key = nullptr;
reader.ratchet_key_length = 0; reader.ratchet_key_length = 0;
reader.ciphertext = nullptr; reader.ciphertext = nullptr;
...@@ -291,6 +293,7 @@ void olm::decode_one_time_key_message( ...@@ -291,6 +293,7 @@ void olm::decode_one_time_key_message(
std::uint8_t const * end = input + input_length; std::uint8_t const * end = input + input_length;
std::uint8_t const * unknown = nullptr; std::uint8_t const * unknown = nullptr;
reader.version = 0;
reader.one_time_key = nullptr; reader.one_time_key = nullptr;
reader.one_time_key_length = 0; reader.one_time_key_length = 0;
reader.identity_key = nullptr; reader.identity_key = nullptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment