Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
370 B

  1. #include <windows.h>
  2. DWORD_PTR __security_cookie;
  3. void __cdecl __report_gsfailure(void);
  4. void __declspec(naked) __fastcall __security_check_cookie(DWORD_PTR cookie)
  5. {
  6. /* x86 version written in asm to preserve all regs */
  7. __asm {
  8. cmp ecx, __security_cookie
  9. jne failure
  10. ret
  11. failure:
  12. jmp __report_gsfailure
  13. }
  14. }