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
10e7e812
Commit
10e7e812
authored
Jun 23, 2015
by
Mark Haines
Browse files
Add missing include, fix bug in handling unknown message fields
parent
39a08733
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/axolotl/cipher.hh
View file @
10e7e812
...
...
@@ -17,6 +17,7 @@
#define AXOLOTL_CIPHER_HH_
#include <cstdint>
#include <cstddef>
namespace
axolotl
{
...
...
src/message.cpp
View file @
10e7e812
...
...
@@ -140,10 +140,10 @@ std::uint8_t const * skip_unknown(
)
{
if
(
pos
!=
end
)
{
uint8_t
tag
=
*
pos
;
if
(
tag
&
0x7
==
0
)
{
if
(
(
tag
&
0x7
)
==
0
)
{
pos
=
varint_skip
(
pos
,
end
);
pos
=
varint_skip
(
pos
,
end
);
}
else
if
(
tag
&
0x7
==
2
)
{
}
else
if
(
(
tag
&
0x7
)
==
2
)
{
pos
=
varint_skip
(
pos
,
end
);
std
::
uint8_t
const
*
len_start
=
pos
;
pos
=
varint_skip
(
pos
,
end
);
...
...
@@ -222,7 +222,7 @@ void axolotl::decode_message(
reader
.
ciphertext
,
reader
.
ciphertext_length
);
if
(
unknown
==
pos
)
{
pos
=
=
skip_unknown
(
pos
,
end
);
pos
=
skip_unknown
(
pos
,
end
);
}
unknown
=
pos
;
}
...
...
@@ -305,7 +305,7 @@ void axolotl::decode_one_time_key_message(
reader
.
message
,
reader
.
message_length
);
if
(
unknown
==
pos
)
{
pos
=
=
skip_unknown
(
pos
,
end
);
pos
=
skip_unknown
(
pos
,
end
);
}
unknown
=
pos
;
}
...
...
Write
Preview
Markdown
is supported
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