Have sodium_munlock() zero the buffer before unlocking it.
This commit is contained in:
parent
2094263048
commit
a30f364ce1
@ -172,6 +172,7 @@ sodium_mlock(void * const addr, const size_t len)
|
|||||||
int
|
int
|
||||||
sodium_munlock(void * const addr, const size_t len)
|
sodium_munlock(void * const addr, const size_t len)
|
||||||
{
|
{
|
||||||
|
sodium_memzero(addr, len);
|
||||||
#ifdef HAVE_MLOCK
|
#ifdef HAVE_MLOCK
|
||||||
return munlock(addr, len);
|
return munlock(addr, len);
|
||||||
#elif defined(HAVE_VIRTUALLOCK)
|
#elif defined(HAVE_VIRTUALLOCK)
|
||||||
|
Loading…
Reference in New Issue
Block a user