mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Enable some runtime hardening on win32
This commit is contained in:
parent
b8dc349099
commit
edd947b645
1 changed files with 7 additions and 1 deletions
|
@ -723,7 +723,13 @@ bool secure_rand_fill_buf(void *buf, size_t len)
|
||||||
|
|
||||||
void osSpecificInit()
|
void osSpecificInit()
|
||||||
{
|
{
|
||||||
// nothing here yet
|
#ifdef _WIN32
|
||||||
|
// hardening options
|
||||||
|
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
|
||||||
|
SetSearchPathMode(BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE |
|
||||||
|
BASE_SEARCH_PATH_PERMANENT);
|
||||||
|
SetProcessDEPPolicy(PROCESS_DEP_ENABLE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue