mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibC: Use 64-bit stack smash value for 64-bit mode
Otherwise it'll use the first 32 bits that happen to come after, leading to very weird bugs. Fixes #8601
This commit is contained in:
parent
205c8a12ed
commit
a5a62f99c5
Notes:
sideshowbarker
2024-07-18 08:53:50 +09:00
Author: https://github.com/dascandy
Commit: a5a62f99c5
Pull-request: https://github.com/SerenityOS/serenity/pull/8821
Issue: https://github.com/SerenityOS/serenity/issues/8601
Reviewed-by: https://github.com/gunnarbeutner ✅
3 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue