mirror of https://github.com/flysand7/ciabatta.git
Implement __stack_chk_fail
This commit is contained in:
parent
c72164fff0
commit
85e0c445ae
|
@ -1,8 +1,13 @@
|
||||||
|
|
||||||
|
|
||||||
int __stack_chk_fail() {
|
static char stack_chk_fail_msg[] =
|
||||||
// TODO: implement proper stack protector support
|
"Stack check failed. "
|
||||||
return 0;
|
"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(
|
void __libc_start_main(
|
||||||
|
|
Loading…
Reference in New Issue