mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Have sodium_munlock() zero the buffer before unlocking it.
This commit is contained in:
@@ -172,6 +172,7 @@ sodium_mlock(void * const addr, const size_t len)
|
||||
int
|
||||
sodium_munlock(void * const addr, const size_t len)
|
||||
{
|
||||
sodium_memzero(addr, len);
|
||||
#ifdef HAVE_MLOCK
|
||||
return munlock(addr, len);
|
||||
#elif defined(HAVE_VIRTUALLOCK)
|
||||
|
||||
Reference in New Issue
Block a user