|
Initializes a stack guard cookie.
Unit
Syntax
ParametersASecurityCookie [out] Returns transparent "magic" value. This must be a local variable in the function. The local variable must be listed first.
RemarksThis function initializes ASecurityCookie argument with some "magic" value, which is supposed to stay unchanged during execution of current routine. If stack corruption occurs (e.g. buffer overflow damages the stack) - then this value will be changed. This change can be detected later by the __security_check_cookie function.
This function also protects against overwrites of return address. In other words, if function's return address will be changed/corrupted/overwritten between calls to the __security_check_cookie/__security_check_cookie functions - an error will be triggered.
Examples
See also
| ||||||||