1
Fork 0
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:
Brian Gianforcaro 2021-09-12 14:28:17 -07:00 committed by Andreas Kling
parent ff1e5aa935
commit 43f4292ca0

View file

@ -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);
}
}