ciabatta/src/os_win/cookie.c

16 lines
360 B
C
Raw Normal View History

2022-08-08 12:39:43 +00:00
u64 __security_cookie;
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
__security_cookie = 0xb26e04cc62ba48aULL;
2022-08-08 12:39:43 +00:00
}
void __security_check_cookie(u64 retrieved) {
if(__security_cookie != retrieved) {
printf("Bro you've got a buffer overrun\n");
abort();
}
}