2011-11-20 14:04:40 +00:00
|
|
|
|
/*
|
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
|
* PROJECT: ReactOS C run time library
|
|
|
|
|
* PURPOSE: Stack checker
|
|
|
|
|
* PROGRAMMERS: J<EFBFBD>r<EFBFBD>me Gardou
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <asm.inc>
|
|
|
|
|
#include <ks386.inc>
|
|
|
|
|
|
2021-09-13 01:33:14 +00:00
|
|
|
|
/* Code is taken from wine 1.3.33,
|
2011-11-20 14:04:40 +00:00
|
|
|
|
* Copyright Jon Griffiths and Alexandre Julliard
|
|
|
|
|
*/
|
|
|
|
|
EXTERN __chkesp_failed:PROC
|
|
|
|
|
|
|
|
|
|
PUBLIC __chkesp
|
|
|
|
|
.code
|
|
|
|
|
__chkesp:
|
|
|
|
|
jnz .test_failed
|
|
|
|
|
ret
|
2021-09-13 01:33:14 +00:00
|
|
|
|
|
2011-11-20 14:04:40 +00:00
|
|
|
|
.test_failed:
|
|
|
|
|
push ebp
|
|
|
|
|
mov ebp, esp
|
|
|
|
|
sub esp, 12
|
|
|
|
|
push eax
|
|
|
|
|
push ecx
|
|
|
|
|
push edx
|
|
|
|
|
call __chkesp_failed
|
|
|
|
|
pop edx
|
|
|
|
|
pop ecx
|
|
|
|
|
pop eax
|
|
|
|
|
leave
|
|
|
|
|
ret
|
2021-09-13 01:33:14 +00:00
|
|
|
|
|
2011-11-20 14:04:40 +00:00
|
|
|
|
END
|