diff --git a/Kernel/init.cpp b/Kernel/init.cpp index a0ba15cc13a..7e47b916d47 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -64,8 +64,8 @@ extern ctor_func_t end_heap_ctors; extern ctor_func_t start_ctors; extern ctor_func_t end_ctors; -extern u32 __stack_chk_guard; -u32 __stack_chk_guard; +extern size_t __stack_chk_guard; +size_t __stack_chk_guard; extern "C" u8* start_of_safemem_text; extern "C" u8* end_of_safemem_text; @@ -147,7 +147,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init() // Initialize TimeManagement before using randomness! TimeManagement::initialize(0); - __stack_chk_guard = get_fast_random(); + __stack_chk_guard = get_fast_random(); ProcFSComponentRegistry::initialize(); Thread::initialize(); diff --git a/Userland/Libraries/LibC/crt0.cpp b/Userland/Libraries/LibC/crt0.cpp index f496dba46ee..00c900e43c1 100644 --- a/Userland/Libraries/LibC/crt0.cpp +++ b/Userland/Libraries/LibC/crt0.cpp @@ -14,7 +14,7 @@ #ifndef _DYNAMIC_LOADER extern "C" { -extern u32 __stack_chk_guard; +extern size_t __stack_chk_guard; int main(int, char**, char**); @@ -31,7 +31,7 @@ NAKED void _start(int, char**, char**) int _entry(int argc, char** argv, char** env) { - u32 original_stack_chk = __stack_chk_guard; + size_t original_stack_chk = __stack_chk_guard; arc4random_buf(&__stack_chk_guard, sizeof(__stack_chk_guard)); if (__stack_chk_guard == 0) diff --git a/Userland/Libraries/LibC/ssp.cpp b/Userland/Libraries/LibC/ssp.cpp index dbc108bd6e2..434cde286d9 100644 --- a/Userland/Libraries/LibC/ssp.cpp +++ b/Userland/Libraries/LibC/ssp.cpp @@ -17,8 +17,8 @@ extern "C" { -extern u32 __stack_chk_guard; -u32 __stack_chk_guard = (u32)0xc6c7c8c9; +extern size_t __stack_chk_guard; +size_t __stack_chk_guard = (size_t)0xc6c7c8c9; __attribute__((noreturn)) void __stack_chk_fail() {