[Kernel] Validate pthread stack bounds before reporting them
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
This commit is contained in:
parent
0b41146cd3
commit
b8a5155d17
|
|
@ -574,6 +574,11 @@ public static class KernelPthreadExtendedCompatExports
|
|||
return (int)OrbisGen2Result.ORBIS_GEN2_OK;
|
||||
}
|
||||
|
||||
private static bool IsValidStackBounds(ulong stackAddress, ulong stackSize) =>
|
||||
stackAddress != 0 &&
|
||||
stackSize != 0 &&
|
||||
stackAddress <= ulong.MaxValue - stackSize;
|
||||
|
||||
private static bool TryInferNativeGuestStack(ulong stackPointer, out ulong stackAddress)
|
||||
{
|
||||
stackAddress = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue