mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
LibC: Implement explicit_bzero with AK::secure_zero
This commit is contained in:
parent
ff1e5aa935
commit
43f4292ca0
Notes:
sideshowbarker
2024-07-18 04:04:29 +09:00
Author: https://github.com/bgianfo
Commit: 43f4292ca0
Pull-request: https://github.com/SerenityOS/serenity/pull/10008
Reviewed-by: https://github.com/Dexesttp ✅
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