diff options
author | Keegan Saunders <keegan@undefinedbehaviour.org> | 2022-11-26 13:17:32 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-11-29 11:04:21 +0100 |
commit | 89b23c473a57ddc37c316cca9b21d7a636e86d81 (patch) | |
tree | 73635c650a4b19949ca24742bf1c170864af9aba /Kernel/Prekernel | |
parent | 675e5bfdcebb41eb172027824ad46ab056c2730e (diff) | |
download | serenity-89b23c473a57ddc37c316cca9b21d7a636e86d81.zip |
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.
Diffstat (limited to 'Kernel/Prekernel')
-rw-r--r-- | Kernel/Prekernel/init.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Prekernel/init.cpp b/Kernel/Prekernel/init.cpp index 44acfcf07b..ce7476fb44 100644 --- a/Kernel/Prekernel/init.cpp +++ b/Kernel/Prekernel/init.cpp @@ -20,8 +20,8 @@ #endif // Defined in the linker script -extern size_t __stack_chk_guard; -size_t __stack_chk_guard __attribute__((used)); +extern uintptr_t __stack_chk_guard; +uintptr_t __stack_chk_guard __attribute__((used)); extern "C" [[noreturn]] void __stack_chk_fail(); extern "C" u8 start_of_prekernel_image[]; |