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
26a7ef8d
Commit
26a7ef8d
authored
Jan 09, 2017
by
ylecollen
Browse files
Clear some data before releasing them
parent
99ff3d15
Changes
2
Hide whitespace changes
Inline
Side-by-side
java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_inbound_group_session.cpp
View file @
26a7ef8d
...
@@ -307,6 +307,7 @@ JNIEXPORT jbyteArray OLM_INBOUND_GROUP_SESSION_FUNC_DEF(decryptMessageJni)(JNIEn
...
@@ -307,6 +307,7 @@ JNIEXPORT jbyteArray OLM_INBOUND_GROUP_SESSION_FUNC_DEF(decryptMessageJni)(JNIEn
if
(
plainTextMsgPtr
)
if
(
plainTextMsgPtr
)
{
{
memset
(
plainTextMsgPtr
,
0
,
maxPlainTextLength
*
sizeof
(
uint8_t
));
free
(
plainTextMsgPtr
);
free
(
plainTextMsgPtr
);
}
}
}
}
...
...
java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_outbound_group_session.cpp
View file @
26a7ef8d
...
@@ -129,6 +129,8 @@ JNIEXPORT void OLM_OUTBOUND_GROUP_SESSION_FUNC_DEF(initOutboundGroupSessionJni)(
...
@@ -129,6 +129,8 @@ JNIEXPORT void OLM_OUTBOUND_GROUP_SESSION_FUNC_DEF(initOutboundGroupSessionJni)(
LOGD
(
" ## initOutboundGroupSessionJni(): success - result=%lu"
,
static_cast
<
long
unsigned
int
>
(
sessionResult
));
LOGD
(
" ## initOutboundGroupSessionJni(): success - result=%lu"
,
static_cast
<
long
unsigned
int
>
(
sessionResult
));
}
}
// clear the random buffer
memset
(
randomBuffPtr
,
0
,
randomLength
);
free
(
randomBuffPtr
);
free
(
randomBuffPtr
);
}
}
}
}
...
...
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