mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-25 17:30:05 +00:00
server_session: Provide more useful information and don't crash on bad IPC request.
This commit is contained in:
parent
403dfd68fc
commit
ca4bf671ce
@ -71,6 +71,14 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con
|
|||||||
const u32 object_id{context.GetDomainMessageHeader()->object_id};
|
const u32 object_id{context.GetDomainMessageHeader()->object_id};
|
||||||
switch (domain_message_header->command) {
|
switch (domain_message_header->command) {
|
||||||
case IPC::DomainMessageHeader::CommandType::SendMessage:
|
case IPC::DomainMessageHeader::CommandType::SendMessage:
|
||||||
|
if (object_id > domain_request_handlers.size()) {
|
||||||
|
LOG_CRITICAL(IPC,
|
||||||
|
"object_id {} is too big! This probably means a recent service call "
|
||||||
|
"to {} needed to return a new interface!",
|
||||||
|
object_id, name);
|
||||||
|
UNREACHABLE();
|
||||||
|
return RESULT_SUCCESS; // Ignore error if asserts are off
|
||||||
|
}
|
||||||
return domain_request_handlers[object_id - 1]->HandleSyncRequest(context);
|
return domain_request_handlers[object_id - 1]->HandleSyncRequest(context);
|
||||||
|
|
||||||
case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: {
|
case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: {
|
||||||
|
Loading…
Reference in New Issue
Block a user