mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:55:42 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
23
sdk/lib/gcc_ssp/gcc_ssp.c
Normal file
23
sdk/lib/gcc_ssp/gcc_ssp.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
#define FAST_FAIL_STACK_COOKIE_CHECK_FAILURE 2
|
||||
|
||||
/* Should be random :-/ */
|
||||
void * __stack_chk_guard = (void*)0xf00df00d;
|
||||
|
||||
#if 0
|
||||
void __stack_chk_guard_setup()
|
||||
{
|
||||
unsigned char * p;
|
||||
p = (unsigned char *)&__stack_chk_guard; // *** Notice that this takes the address of __stack_chk_guard ***
|
||||
|
||||
/* If you have the ability to generate random numbers in your kernel then use them,
|
||||
otherwise for 32-bit code: */
|
||||
*p = 0x00000aff; // *** p is &__stack_chk_guard so *p writes to __stack_chk_guard rather than *__stack_chk_guard ***
|
||||
}
|
||||
#endif
|
||||
|
||||
void __stack_chk_fail()
|
||||
{
|
||||
/* Like __fastfail */
|
||||
__asm__("int $0x29" : : "c"(FAST_FAIL_STACK_COOKIE_CHECK_FAILURE) : "memory");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue