Zero out TIB

Not for any particular reason, but having it contain non-deterministic
stack garbage seems like a bad idea.
This commit is contained in:
Simon Lindholm 2023-10-02 16:54:32 +02:00
parent 32887d2439
commit b1dd93d7b7
1 changed files with 1 additions and 0 deletions

View File

@ -345,6 +345,7 @@ int main(int argc, char **argv) {
tib.peb->ProcessParameters = (RTL_USER_PROCESS_PARAMETERS*)calloc(sizeof(RTL_USER_PROCESS_PARAMETERS), 1); tib.peb->ProcessParameters = (RTL_USER_PROCESS_PARAMETERS*)calloc(sizeof(RTL_USER_PROCESS_PARAMETERS), 1);
struct user_desc tibDesc; struct user_desc tibDesc;
memset(&tibDesc, 0, sizeof tibDesc);
tibDesc.entry_number = 0; tibDesc.entry_number = 0;
tibDesc.base_addr = (unsigned int) &tib; tibDesc.base_addr = (unsigned int) &tib;
tibDesc.limit = 0x1000; tibDesc.limit = 0x1000;