Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Olm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
Olm
Commits
0ec6a658
Commit
0ec6a658
authored
6 years ago
by
Hubert Chathi
Browse files
Options
Downloads
Patches
Plain Diff
add more buffer clearing
parent
5ef6a844
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/olm/group_session.py
+7
-1
7 additions, 1 deletion
python/olm/group_session.py
with
7 additions
and
1 deletion
python/olm/group_session.py
+
7
−
1
View file @
0ec6a658
...
...
@@ -283,7 +283,12 @@ class InboundGroupSession(object):
message_index
)
self
.
_check_error
(
ret
)
return
bytes_to_native_str
(
ffi
.
unpack
(
export_buffer
,
export_length
))
export_str
=
bytes_to_native_str
(
ffi
.
unpack
(
export_buffer
,
export_length
))
# clear out copies of the key
lib
.
memset
(
export_buffer
,
0
,
export_length
)
return
export_str
@classmethod
def
import_session
(
cls
,
session_key
):
...
...
@@ -313,6 +318,7 @@ class InboundGroupSession(object):
)
obj
.
_check_error
(
ret
)
finally
:
# clear out copies of the key
if
byte_session_key
is
not
session_key
:
for
i
in
range
(
0
,
len
(
byte_session_key
)):
byte_session_key
[
i
]
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment