diff --git a/src/linux/entry.c b/src/linux/entry.c index bc7b0f9..3d28731 100644 --- a/src/linux/entry.c +++ b/src/linux/entry.c @@ -1,8 +1,13 @@ -int __stack_chk_fail() { - // TODO: implement proper stack protector support - return 0; +static char stack_chk_fail_msg[] = + "Stack check failed. " + "You've got a stack corruption somewhere. " + "Sorry these guys didn't tell me where\n"; + +void __stack_chk_fail(void) { + syscall_write(STDERR_FILENO, stack_chk_fail_msg, sizeof stack_chk_fail_msg); + syscall_exit(1); } void __libc_start_main(