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
131f7cfd
Commit
131f7cfd
authored
Jul 13, 2021
by
Denis Kasak
Committed by
Hubert Chathi
Jul 31, 2021
Browse files
Fix off-by-one comparison error when unpickling uint32_t.
parent
bdd73c5c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/pickle.cpp
View file @
131f7cfd
...
...
@@ -30,7 +30,7 @@ std::uint8_t const * olm::unpickle(
std
::
uint32_t
&
value
)
{
value
=
0
;
if
(
!
pos
||
end
<
=
pos
+
4
)
return
nullptr
;
if
(
!
pos
||
end
<
pos
+
4
)
return
nullptr
;
for
(
unsigned
i
=
4
;
i
--
;)
{
value
<<=
8
;
value
|=
*
(
pos
++
);
}
return
pos
;
}
...
...
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