mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:17:46 +00:00
LibC: Implement explicit_bzero with AK::secure_zero
This commit is contained in:
parent
ff1e5aa935
commit
43f4292ca0
1 changed files with 2 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <AK/Format.h>
|
||||
#include <AK/MemMem.h>
|
||||
#include <AK/Memory.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/Types.h>
|
||||
|
@ -481,8 +482,6 @@ size_t strxfrm(char* dest, const char* src, size_t n)
|
|||
|
||||
void explicit_bzero(void* ptr, size_t size)
|
||||
{
|
||||
memset(ptr, 0, size);
|
||||
asm volatile("" ::
|
||||
: "memory");
|
||||
secure_zero(ptr, size);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue