/* * Stack Smash Protector * Source: https://wiki.osdev.org/Stack_Smashing_Protector */ #include #ifndef STACK_CHK_GUARD #error "STACK_CHK_GUARD not defined!" #endif uintptr_t __stack_chk_guard = STACK_CHK_GUARD; __noreturn void __stack_chk_fail(void) { panic("Stack smashing detected!"); }