mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibC: Use uintptr_t for __stack_chk_guard
We used size_t, which is a type that is guarenteed to be large enough to hold an array index, but uintptr_t is designed to be used to hold pointer values, which is the case of stack guards.
This commit is contained in:
parent
675e5bfdce
commit
89b23c473a
6 changed files with 11 additions and 11 deletions
|
@ -68,8 +68,8 @@ extern ctor_func_t end_heap_ctors[];
|
|||
extern ctor_func_t start_ctors[];
|
||||
extern ctor_func_t end_ctors[];
|
||||
|
||||
extern size_t __stack_chk_guard;
|
||||
READONLY_AFTER_INIT size_t __stack_chk_guard __attribute__((used));
|
||||
extern uintptr_t __stack_chk_guard;
|
||||
READONLY_AFTER_INIT uintptr_t __stack_chk_guard __attribute__((used));
|
||||
|
||||
extern "C" u8 start_of_safemem_text[];
|
||||
extern "C" u8 end_of_safemem_text[];
|
||||
|
@ -234,7 +234,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
|
|||
// Initialize TimeManagement before using randomness!
|
||||
TimeManagement::initialize(0);
|
||||
|
||||
__stack_chk_guard = get_fast_random<size_t>();
|
||||
__stack_chk_guard = get_fast_random<uintptr_t>();
|
||||
|
||||
ProcFSComponentRegistry::initialize();
|
||||
JailManagement::the();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue