diff options
| author | Aleksa Vučković <aleksav013@gmail.com> | 2022-01-09 18:50:48 +0100 |
|---|---|---|
| committer | Aleksa Vučković <aleksav013@gmail.com> | 2022-01-10 22:36:52 +0100 |
| commit | 8e79ceaa7d3995df5a5dcf0ffdbd52ebe4c52163 (patch) | |
| tree | 60424b081f4a3e37e0c87dfa764ea559f1ba0543 /src/c/stack_protector.c | |
| parent | dbbb74c22f42df9175eaea72c1eb12d6deab332c (diff) | |
Indentation
Diffstat (limited to 'src/c/stack_protector.c')
| -rw-r--r-- | src/c/stack_protector.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/c/stack_protector.c b/src/c/stack_protector.c index 9ce3cba..37f7cda 100644 --- a/src/c/stack_protector.c +++ b/src/c/stack_protector.c @@ -1,22 +1,14 @@ #include<stdint.h> #include<stdio.h> - + #if UINT32_MAX == UINTPTR_MAX #define STACK_CHK_GUARD 0xe2dee396 #else #define STACK_CHK_GUARD 0x595e9fbd94fda766 #endif - + uintptr_t __stack_chk_guard = STACK_CHK_GUARD; - -//__attribute__((noreturn)) void __stack_chk_fail(void) { -#if __STDC_HOSTED__ - printf("Stack smashing detected\n"); - abort(); -#elif __is_myos_kernel - printf("Stack smashing detected\n"); - panic("Stack smashing detected"); -#endif + printf("Stack smashing detected\n"); } |
