mirror of https://git.matrix.org/git/olm.git
Clear some data before releasing them
parent
99ff3d15c8
commit
26a7ef8ddc
|
@ -307,6 +307,7 @@ JNIEXPORT jbyteArray OLM_INBOUND_GROUP_SESSION_FUNC_DEF(decryptMessageJni)(JNIEn
|
|||
|
||||
if (plainTextMsgPtr)
|
||||
{
|
||||
memset(plainTextMsgPtr, 0, maxPlainTextLength*sizeof(uint8_t));
|
||||
free(plainTextMsgPtr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,6 +129,8 @@ JNIEXPORT void OLM_OUTBOUND_GROUP_SESSION_FUNC_DEF(initOutboundGroupSessionJni)(
|
|||
LOGD(" ## initOutboundGroupSessionJni(): success - result=%lu", static_cast<long unsigned int>(sessionResult));
|
||||
}
|
||||
|
||||
// clear the random buffer
|
||||
memset(randomBuffPtr, 0, randomLength);
|
||||
free(randomBuffPtr);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue