mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
Keep usermode stack 4-byte aligned
svn path=/trunk/; revision=13227
This commit is contained in:
@@ -292,7 +292,8 @@ NtW32Call (IN ULONG RoutineIndex,
|
||||
memcpy((char*)NewStack + StackSize - sizeof(KTRAP_FRAME) - sizeof(FX_SAVE_AREA),
|
||||
Thread->Tcb.TrapFrame, sizeof(KTRAP_FRAME) - (4 * sizeof(DWORD)));
|
||||
NewFrame = (PKTRAP_FRAME)((char*)NewStack + StackSize - sizeof(KTRAP_FRAME) - sizeof(FX_SAVE_AREA));
|
||||
NewFrame->Esp -= (ArgumentLength + (4 * sizeof(ULONG)));
|
||||
/* We need the stack pointer to remain 4-byte aligned */
|
||||
NewFrame->Esp -= (((ArgumentLength + 3) & (~ 0x3)) + (4 * sizeof(ULONG)));
|
||||
NewFrame->Eip = (ULONG)LdrpGetSystemDllCallbackDispatcher();
|
||||
UserEsp = (PULONG)NewFrame->Esp;
|
||||
UserEsp[0] = 0; /* Return address. */
|
||||
|
||||
Reference in New Issue
Block a user