From 94db6e5f3fc347b4fe1cbeb862019be55f8203ea Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 24 Dec 2018 16:16:28 -0500 Subject: am: Add size parameter to am:IStorage logging --- src/core/hle/service/am/am.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/hle/service/am/am.cpp') diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index d13ce4dca..512386422 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -721,10 +721,10 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 offset{rp.Pop()}; - LOG_DEBUG(Service_AM, "called, offset={}", offset); - const std::vector data{ctx.ReadBuffer()}; + LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, data.size()); + if (data.size() > backing.buffer.size() - offset) { LOG_ERROR(Service_AM, "offset is out of bounds, backing_buffer_sz={}, data_size={}, offset={}", @@ -744,10 +744,10 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 offset{rp.Pop()}; - LOG_DEBUG(Service_AM, "called, offset={}", offset); - const std::size_t size{ctx.GetWriteBufferSize()}; + LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, size); + if (size > backing.buffer.size() - offset) { LOG_ERROR(Service_AM, "offset is out of bounds, backing_buffer_sz={}, size={}, offset={}", backing.buffer.size(), size, offset); -- cgit v1.2.3 From 69f622be363418fcf61e79a0aed1fd06523ff690 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 24 Dec 2018 16:21:12 -0500 Subject: applets: Implement LibAppletOff (Web) applet --- src/core/hle/service/am/am.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/hle/service/am/am.cpp') diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 512386422..c851e5420 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -23,6 +23,7 @@ #include "core/hle/service/am/applets/profile_select.h" #include "core/hle/service/am/applets/software_keyboard.h" #include "core/hle/service/am/applets/stub_applet.h" +#include "core/hle/service/am/applets/web_browser.h" #include "core/hle/service/am/idle.h" #include "core/hle/service/am/omm.h" #include "core/hle/service/am/spsm.h" @@ -43,6 +44,7 @@ constexpr ResultCode ERR_SIZE_OUT_OF_BOUNDS{ErrorModule::AM, 0x1F7}; enum class AppletId : u32 { ProfileSelect = 0x10, SoftwareKeyboard = 0x11, + LibAppletOff = 0x17, }; constexpr u32 POP_LAUNCH_PARAMETER_MAGIC = 0xC79497CA; @@ -782,6 +784,8 @@ static std::shared_ptr GetAppletFromId(AppletId id) { return std::make_shared(); case AppletId::SoftwareKeyboard: return std::make_shared(); + case AppletId::LibAppletOff: + return std::make_shared(); default: LOG_ERROR(Service_AM, "Unimplemented AppletId [{:08X}]! -- Falling back to stub!", static_cast(id)); -- cgit v1.2.3