Detect when NtQuerySymbolicLinkObject is called without an EmuHandle

This commit is contained in:
Anthony 2021-02-26 20:59:06 +13:00
parent 16c449ddc7
commit de20deaa8a
1 changed files with 6 additions and 3 deletions

View File

@ -1371,11 +1371,14 @@ XBSYSAPI EXPORTNUM(215) xbox::ntstatus_xt NTAPI xbox::NtQuerySymbolicLinkObject
LOG_FUNC_ARG_OUT(ReturnedLength)
LOG_FUNC_END;
NTSTATUS ret = 0;
NTSTATUS ret = STATUS_INVALID_HANDLE;
EmuNtSymbolicLinkObject* symbolicLinkObject = NULL;
// Check that we actually got an EmuHandle :
ret = STATUS_INVALID_HANDLE;
// We expect LinkHandle to always be an EmuHandle
if (!EmuHandle::IsEmuHandle(LinkHandle)) {
LOG_UNIMPLEMENTED();
return ret;
}
auto iEmuHandle = (EmuHandle*)LinkHandle;
// Retrieve the NtSymbolicLinkObject and populate the output arguments :