mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-23 10:50:01 +00:00
IOS/ES: Check that m_addtitle_tmd is valid before use
This commit is contained in:
parent
95aa48d086
commit
6f79f741d5
1 changed files with 6 additions and 0 deletions
|
@ -447,6 +447,9 @@ IPCCommandResult ES::AddContentStart(const IOCtlVRequest& request)
|
|||
"content id %08x",
|
||||
title_id, m_addtitle_content_id);
|
||||
|
||||
if (!m_addtitle_tmd.IsValid())
|
||||
return GetDefaultReply(ES_PARAMETER_SIZE_OR_ALIGNMENT);
|
||||
|
||||
if (title_id != m_addtitle_tmd.GetTitleId())
|
||||
{
|
||||
ERROR_LOG(IOS_ES, "IOCTL_ES_ADDCONTENTSTART: title id %016" PRIx64 " != "
|
||||
|
@ -486,6 +489,9 @@ IPCCommandResult ES::AddContentFinish(const IOCtlVRequest& request)
|
|||
u32 content_fd = Memory::Read_U32(request.in_vectors[0].address);
|
||||
INFO_LOG(IOS_ES, "IOCTL_ES_ADDCONTENTFINISH: content fd %08x", content_fd);
|
||||
|
||||
if (!m_addtitle_tmd.IsValid())
|
||||
return GetDefaultReply(ES_PARAMETER_SIZE_OR_ALIGNMENT);
|
||||
|
||||
// Try to find the title key from a pre-installed ticket.
|
||||
IOS::ES::TicketReader ticket = DiscIO::FindSignedTicket(m_addtitle_tmd.GetTitleId());
|
||||
if (!ticket.IsValid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue