kernel: fix RtlWalkFrameChain according to xbox kernel test suite failed test

This commit is contained in:
RadWolfie 2023-12-17 19:02:20 -06:00
parent b09d3ca69a
commit a2fb41856d
1 changed files with 5 additions and 0 deletions

View File

@ -2224,6 +2224,11 @@ XBSYSAPI EXPORTNUM(319) xbox::ulong_xt NTAPI xbox::RtlWalkFrameChain
ulong_ptr_xt NewStack = *(ulong_ptr_xt*)Stack;
ulong_xt Eip = *(ulong_ptr_xt*)(Stack + sizeof(ulong_ptr_xt));
/* Check if Eip is not below executable's dos header */
if (Eip < KiB(64)) {
break;
}
/* Check if the new pointer is above the old one and past the end */
if (!((Stack < NewStack) && (NewStack < StackEnd))) {
/* Stop searching after this entry */