diff options
author | Subv <subv2112@gmail.com> | 2017-07-21 20:02:40 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-07-21 21:59:21 +0200 |
commit | 2dc720c355dad55a607c1f993fc823cc198bed08 (patch) | |
tree | 9a4be495c430689a33c041959e5f15c971a4669e /src | |
parent | Services/APT: Use boost::optional for the APT parameter structure. (diff) | |
download | yuzu-2dc720c355dad55a607c1f993fc823cc198bed08.tar yuzu-2dc720c355dad55a607c1f993fc823cc198bed08.tar.gz yuzu-2dc720c355dad55a607c1f993fc823cc198bed08.tar.bz2 yuzu-2dc720c355dad55a607c1f993fc823cc198bed08.tar.lz yuzu-2dc720c355dad55a607c1f993fc823cc198bed08.tar.xz yuzu-2dc720c355dad55a607c1f993fc823cc198bed08.tar.zst yuzu-2dc720c355dad55a607c1f993fc823cc198bed08.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/apt/apt.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index e4068926a..b5748693f 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -227,6 +227,20 @@ void ReceiveParameter(Service::Interface* self) { "buffer_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)", buffer_size, static_buff_size); + if (!next_parameter) { + IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); + rb.Push(ResultCode(ErrorDescription::NoData, ErrorModule::Applet, + ErrorSummary::InvalidState, ErrorLevel::Status)); + return; + } + + if (next_parameter->destination_id != app_id) { + IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); + rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Applet, ErrorSummary::NotFound, + ErrorLevel::Status)); + return; + } + IPC::RequestBuilder rb = rp.MakeBuilder(4, 4); rb.Push(RESULT_SUCCESS); // No error @@ -259,6 +273,20 @@ void GlanceParameter(Service::Interface* self) { "buffer_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)", buffer_size, static_buff_size); + if (!next_parameter) { + IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); + rb.Push(ResultCode(ErrorDescription::NoData, ErrorModule::Applet, + ErrorSummary::InvalidState, ErrorLevel::Status)); + return; + } + + if (next_parameter->destination_id != app_id) { + IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); + rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Applet, ErrorSummary::NotFound, + ErrorLevel::Status)); + return; + } + IPC::RequestBuilder rb = rp.MakeBuilder(4, 4); rb.Push(RESULT_SUCCESS); // No error rb.Push(next_parameter->sender_id); |