2022-08-08 12:39:43 +00:00
|
|
|
|
|
|
|
u64 __security_cookie;
|
|
|
|
|
2023-01-27 06:50:37 +00:00
|
|
|
void __security_init_cookie() {
|
2022-08-08 12:39:43 +00:00
|
|
|
// They say it's a random number so I generated
|
|
|
|
// one using numbergenerator.org
|
2023-01-27 06:50:37 +00:00
|
|
|
__security_cookie = 0xb26e04cc62ba48aULL;
|
2022-08-08 12:39:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void __security_check_cookie(u64 retrieved) {
|
|
|
|
if(__security_cookie != retrieved) {
|
2023-02-15 07:37:23 +00:00
|
|
|
// printf("Bro you've got a buffer overrun\n");
|
2022-08-08 12:39:43 +00:00
|
|
|
abort();
|
|
|
|
}
|
|
|
|
}
|